home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Periodicals / develop / develop Issue 13 / develop 13 < prev   
MacBinary  |  1993-01-25  |  3.9 MB  |  [ONLN/HLX2]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
100% file MacBinary II, inited, Mon Jan 25 05:34:20 1993, modified Mon Jan 25 05:45:43 1993, creator 'HLX2', type 'ONLN', 4039284 bytes "develop 13" , at 0x3da2f4 38989 bytes resource default (weak)
99% file data default
100% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[ONLN]
macFileCreator[HLX2]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0a 64 65 76 65 6c 6f | 70 20 31 33 00 00 00 00 |..develo|p 13....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 3d a2 74 00 | 00 98 4d a7 89 72 ac a7 |....=.t.|..M..r..|
|00000060| 89 75 57 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.uW.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 76 83 00 00 |........|....v...|
|00000080| 64 65 76 65 6c 6f 70 0d | 54 68 65 20 41 70 70 6c |develop.|The Appl|
|00000090| 65 20 54 65 63 68 6e 69 | 63 61 6c 20 4a 6f 75 72 |e Techni|cal Jour|
|000000a0| 6e 61 6c 0d 09 41 53 59 | 4e 43 48 52 4f 4e 4f 55 |nal..ASY|NCHRONOU|
|000000b0| 53 20 52 4f 55 54 49 4e | 45 53 0d 4f 4e 20 54 48 |S ROUTIN|ES.ON TH|
|000000c0| 45 20 4d 41 43 49 4e 54 | 4f 53 48 0d 49 4e 53 49 |E MACINT|OSH.INSI|
|000000d0| 44 45 20 51 55 49 43 4b | 54 49 4d 45 20 41 4e 44 |DE QUICK|TIME AND|
|000000e0| 0d 43 4f 4d 50 4f 4e 45 | 4e 54 2d 42 41 53 45 44 |.COMPONE|NT-BASED|
|000000f0| 20 4d 41 4e 41 47 45 52 | 53 0d 4d 41 43 49 4e 54 | MANAGER|S.MACINT|
|00000100| 4f 53 48 20 44 45 42 55 | 47 47 49 4e 47 3a 0d 54 |OSH DEBU|GGING:.T|
|00000110| 48 45 20 42 45 4c 4c 59 | 20 4f 46 20 54 48 45 20 |HE BELLY| OF THE |
|00000120| 42 45 41 53 54 0d 52 45 | 56 49 53 49 54 45 44 0d |BEAST.RE|VISITED.|
|00000130| 41 44 56 45 4e 54 55 52 | 45 53 20 49 4e 0d 43 4f |ADVENTUR|ES IN.CO|
|00000140| 4c 4f 52 20 50 52 49 4e | 54 49 4e 47 0d 44 45 56 |LOR PRIN|TING.DEV|
|00000150| 49 43 45 4c 4f 4f 50 20 | 4d 45 45 54 53 20 54 48 |ICELOOP |MEETS TH|
|00000160| 45 0d 49 4e 54 45 52 46 | 41 43 45 20 44 45 53 49 |E.INTERF|ACE DESI|
|00000170| 47 4e 45 52 0d 4c 4f 4f | 4b 49 4e 47 20 41 48 45 |GNER.LOO|KING AHE|
|00000180| 41 44 20 54 4f 0d 50 52 | 49 4e 54 49 4e 47 20 49 |AD TO.PR|INTING I|
|00000190| 4e 20 51 55 49 43 4b 44 | 52 41 57 20 47 58 0d 54 |N QUICKD|RAW GX.T|
|000001a0| 48 45 20 50 41 4c 45 54 | 54 45 20 4d 41 4e 41 47 |HE PALET|TE MANAG|
|000001b0| 45 52 20 57 41 59 0d 4b | 4f 4e 20 26 20 42 41 4c |ER WAY.K|ON & BAL|
|000001c0| d5 53 20 50 55 5a 5a 4c | 45 20 50 41 47 45 0d 4d |.S PUZZL|E PAGE.M|
|000001d0| 41 43 49 4e 54 4f 53 48 | 20 51 20 26 20 41 0d 4e |ACINTOSH| Q & A.N|
|000001e0| 45 57 20 51 55 49 43 4b | 54 49 4d 45 20 43 4f 4c |EW QUICK|TIME COL|
|000001f0| 55 4d 4e 3a 0d 54 4f 50 | 20 31 30 20 51 55 49 43 |UMN:.TOP| 10 QUIC|
|00000200| 4b 54 49 4d 45 20 54 49 | 50 53 0d f0 0d 49 73 73 |KTIME TI|PS...Iss|
|00000210| 75 65 20 31 33 20 20 20 | 4d 61 72 63 68 20 31 39 |ue 13 |March 19|
|00000220| 39 33 09 0d 0d 41 70 70 | 6c 65 20 43 6f 6d 70 75 |93...App|le Compu|
|00000230| 74 65 72 2c 20 49 6e 63 | 2e 0d 45 20 44 20 49 20 |ter, Inc|..E D I |
|00000240| 54 20 4f 20 52 20 49 20 | 41 20 4c 20 20 53 20 54 |T O R I |A L S T|
|00000250| 20 41 20 46 20 46 0d 45 | 64 69 74 6f 72 2d 69 6e | A F F.E|ditor-in|
|00000260| 2d 43 68 65 65 6b 20 20 | 43 61 72 6f 6c 69 6e 65 |-Cheek |Caroline|
|00000270| 20 52 6f 73 65 0d 54 65 | 63 68 6e 69 63 61 6c 20 | Rose.Te|chnical |
|00000280| 42 75 63 6b 73 74 6f 70 | 70 65 72 20 20 44 61 76 |Buckstop|per Dav|
|00000290| 65 20 4a 6f 68 6e 73 6f | 6e 0d 4f 75 72 20 42 6f |e Johnso|n.Our Bo|
|000002a0| 73 73 20 20 47 72 65 67 | 20 4a 6f 73 77 69 61 6b |ss Greg| Joswiak|
|000002b0| 0d 48 69 73 20 42 6f 73 | 73 20 20 44 61 76 69 64 |.His Bos|s David|
|000002c0| 20 4b 72 61 74 68 77 6f | 68 6c 0d 52 65 76 69 65 | Krathwo|hl.Revie|
|000002d0| 77 20 42 6f 61 72 64 20 | 20 50 65 74 65 20 28 d2 |w Board | Pete (.|
|000002e0| 4c 75 6b 65 d3 29 20 41 | 6c 65 78 61 6e 64 65 72 |Luke.) A|lexander|
|000002f0| 2c 20 4e 65 69 6c 20 44 | 61 79 2c 20 43 2e 20 4b |, Neil D|ay, C. K|
|00000300| 2e 20 48 61 75 6e 2c 20 | 4a 69 6d 20 52 65 65 6b |. Haun, |Jim Reek|
|00000310| 65 73 2c 20 42 72 79 61 | 6e 20 4b 2e 20 28 d2 42 |es, Brya|n K. (.B|
|00000320| 65 61 6b 65 72 d3 29 20 | 52 65 73 73 6c 65 72 2c |eaker.) |Ressler,|
|00000330| 20 4c 61 72 72 79 20 52 | 6f 73 65 6e 73 74 65 69 | Larry R|osenstei|
|00000340| 6e 2c 20 41 6e 64 79 20 | 53 68 65 62 61 6e 6f 77 |n, Andy |Shebanow|
|00000350| 2c 20 47 72 65 67 67 20 | 57 69 6c 6c 69 61 6d 73 |, Gregg |Williams|
|00000360| 0d 4d 61 6e 61 67 69 6e | 67 20 45 64 69 74 6f 72 |.Managin|g Editor|
|00000370| 20 20 4d 6f 6e 69 63 61 | 20 4d 65 66 66 65 72 74 | Monica| Meffert|
|00000380| 0d 41 73 73 69 73 74 61 | 6e 74 20 4d 61 6e 61 67 |.Assista|nt Manag|
|00000390| 69 6e 67 20 45 64 69 74 | 6f 72 20 20 43 79 6e 74 |ing Edit|or Cynt|
|000003a0| 68 69 61 20 4a 61 73 70 | 65 72 0d 43 6f 6e 74 72 |hia Jasp|er.Contr|
|000003b0| 69 62 75 74 69 6e 67 20 | 45 64 69 74 6f 72 73 20 |ibuting |Editors |
|000003c0| 20 4c 6f 72 72 61 69 6e | 65 20 41 6e 64 65 72 73 | Lorrain|e Anders|
|000003d0| 6f 6e 2c 20 47 65 74 61 | 20 43 61 72 6c 73 6f 6e |on, Geta| Carlson|
|000003e0| 2c 20 54 6f 6e 69 20 48 | 61 73 6b 65 6c 6c 2c 20 |, Toni H|askell, |
|000003f0| 4a 75 64 79 20 48 65 6c | 66 61 6e 64 2c 20 52 69 |Judy Hel|fand, Ri|
|00000400| 6c 6c 61 20 52 65 79 6e | 6f 6c 64 73 0d 49 6e 64 |lla Reyn|olds.Ind|
|00000410| 65 78 65 72 20 20 49 72 | 61 20 4b 6c 65 69 6e 62 |exer Ir|a Kleinb|
|00000420| 65 72 67 0d 41 20 52 20 | 54 20 20 26 20 20 50 20 |erg.A R |T & P |
|00000430| 52 20 4f 20 44 20 55 20 | 43 20 54 20 49 20 4f 20 |R O D U |C T I O |
|00000440| 4e 0d 50 72 6f 64 75 63 | 74 69 6f 6e 20 4d 61 6e |N.Produc|tion Man|
|00000450| 61 67 65 72 20 20 48 61 | 72 74 6c 65 79 20 4c 65 |ager Ha|rtley Le|
|00000460| 73 73 65 72 0d 41 72 74 | 20 44 69 72 65 63 74 6f |sser.Art| Directo|
|00000470| 72 20 20 44 69 61 6e 65 | 20 57 69 6c 63 6f 78 0d |r Diane| Wilcox.|
|00000480| 54 65 63 68 6e 69 63 61 | 6c 20 49 6c 6c 75 73 74 |Technica|l Illust|
|00000490| 72 61 74 69 6f 6e 20 20 | 44 61 76 65 20 4f 6c 6d |ration |Dave Olm|
|000004a0| 6f 73 2c 20 4a 6f 68 6e | 20 52 79 61 6e 0d 46 6f |os, John| Ryan.Fo|
|000004b0| 72 6d 61 74 74 69 6e 67 | 20 20 46 6f 72 62 65 73 |rmatting| Forbes|
|000004c0| 20 4d 69 6c 6c 20 50 72 | 65 73 73 0d 50 72 69 6e | Mill Pr|ess.Prin|
|000004d0| 74 69 6e 67 20 20 57 6f | 6c 66 65 72 20 50 72 69 |ting Wo|lfer Pri|
|000004e0| 6e 74 69 6e 67 20 43 6f | 6d 70 61 6e 79 2c 20 49 |nting Co|mpany, I|
|000004f0| 6e 63 2e 0d 46 69 6c 6d | 20 50 72 65 70 61 72 61 |nc..Film| Prepara|
|00000500| 74 69 6f 6e 20 20 41 70 | 74 6f 73 20 50 6f 73 74 |tion Ap|tos Post|
|00000510| 2c 20 49 6e 63 2e 0d 50 | 72 6f 64 75 63 74 69 6f |, Inc..P|roductio|
|00000520| 6e 20 20 50 72 65 50 72 | 65 73 73 20 41 73 73 65 |n PrePr|ess Asse|
|00000530| 6d 62 6c 79 0d 50 68 6f | 74 6f 67 72 61 70 68 79 |mbly.Pho|tography|
|00000540| 20 20 53 68 61 72 6f 6e | 20 42 65 61 6c 73 2c 20 | Sharon| Beals, |
|00000550| 4c 69 73 61 20 4a 6f 6e | 67 65 77 61 61 72 64 2c |Lisa Jon|gewaard,|
|00000560| 20 54 6f 6d 20 53 61 6e | 64 62 6f 72 6e 0d 4f 6e | Tom San|dborn.On|
|00000570| 6c 69 6e 65 20 50 72 6f | 64 75 63 74 69 6f 6e 20 |line Pro|duction |
|00000580| 20 4b 61 72 65 6e 20 42 | 72 61 64 79 0d 09 0d 4d | Karen B|rady...M|
|00000590| 61 72 6b 20 4a 65 6e 6b | 69 6e 73 20 6f 66 20 52 |ark Jenk|ins of R|
|000005a0| 75 63 6b 65 72 20 48 75 | 67 67 69 6e 73 20 0d 63 |ucker Hu|ggins .c|
|000005b0| 72 65 61 74 65 64 20 74 | 68 69 73 20 62 65 61 75 |reated t|his beau|
|000005c0| 74 69 66 75 6c 20 69 6d | 61 67 65 20 64 65 70 69 |tiful im|age depi|
|000005d0| 63 74 69 6e 67 20 61 73 | 79 6e 63 68 72 6f 6e 6f |cting as|ynchrono|
|000005e0| 75 73 20 72 6f 75 74 69 | 6e 65 73 20 62 79 20 73 |us routi|nes by s|
|000005f0| 79 6e 63 68 72 6f 6e 69 | 7a 69 6e 67 20 66 6f 75 |ynchroni|zing fou|
|00000600| 72 20 67 72 61 70 68 69 | 63 73 20 61 70 70 6c 69 |r graphi|cs appli|
|00000610| 63 61 74 69 6f 6e 73 3a | 20 41 64 6f 62 65 20 50 |cations:| Adobe P|
|00000620| 68 6f 74 6f 73 68 6f 70 | 2c 20 41 64 6f 62 65 20 |hotoshop|, Adobe |
|00000630| 49 6c 6c 75 73 74 72 61 | 74 6f 72 2c 20 52 61 79 |Illustra|tor, Ray|
|00000640| 20 44 72 65 61 6d 20 44 | 65 73 69 67 6e 65 72 2c | Dream D|esigner,|
|00000650| 20 61 6e 64 20 46 72 61 | 63 74 61 6c 20 44 65 73 | and Fra|ctal Des|
|00000660| 69 67 6e 20 50 61 69 6e | 74 65 72 2e 0d 64 65 76 |ign Pain|ter..dev|
|00000670| 65 6c 6f 70 2c 20 54 68 | 65 20 41 70 70 6c 65 20 |elop, Th|e Apple |
|00000680| 54 65 63 68 6e 69 63 61 | 6c 20 4a 6f 75 72 6e 61 |Technica|l Journa|
|00000690| 6c 2c 20 69 73 20 61 20 | 71 75 61 72 74 65 72 6c |l, is a |quarterl|
|000006a0| 79 20 70 75 62 6c 69 63 | 61 74 69 6f 6e 20 6f 66 |y public|ation of|
|000006b0| 20 41 70 70 6c 65 20 43 | 6f 6d 70 75 74 65 72 d5 | Apple C|omputer.|
|000006c0| 73 20 44 65 76 65 6c 6f | 70 65 72 20 53 75 70 70 |s Develo|per Supp|
|000006d0| 6f 72 74 20 49 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |ort Info|rmation |
|000006e0| 20 67 72 6f 75 70 2e 0d | 54 68 65 20 44 65 76 65 | group..|The Deve|
|000006f0| 6c 6f 70 65 72 20 43 44 | 20 53 65 72 69 65 73 20 |loper CD| Series |
|00000700| 64 69 73 63 20 66 6f 72 | 20 4d 61 72 63 68 20 31 |disc for| March 1|
|00000710| 39 39 33 20 6f 72 20 6c | 61 74 65 72 20 63 6f 6e |993 or l|ater con|
|00000720| 74 61 69 6e 73 20 74 68 | 69 73 20 69 73 73 75 65 |tains th|is issue|
|00000730| 20 61 6e 64 20 61 6c 6c | 20 62 61 63 6b 20 69 73 | and all| back is|
|00000740| 73 75 65 73 20 6f 66 20 | 64 65 76 65 6c 6f 70 20 |sues of |develop |
|00000750| 61 6c 6f 6e 67 20 77 69 | 74 68 20 74 68 65 20 63 |along wi|th the c|
|00000760| 6f 64 65 20 74 68 61 74 | 20 74 68 65 20 61 72 74 |ode that| the art|
|00000770| 69 63 6c 65 73 20 64 65 | 73 63 72 69 62 65 2e 20 |icles de|scribe. |
|00000780| 54 68 65 20 64 65 76 65 | 6c 6f 70 20 69 73 73 75 |The deve|lop issu|
|00000790| 65 73 20 61 6e 64 20 63 | 6f 64 65 20 61 72 65 20 |es and c|ode are |
|000007a0| 61 6c 73 6f 20 61 76 61 | 69 6c 61 62 6c 65 20 6f |also ava|ilable o|
|000007b0| 6e 20 41 70 70 6c 65 4c | 69 6e 6b 20 61 6e 64 20 |n AppleL|ink and |
|000007c0| 76 69 61 20 61 6e 6f 6e | 79 6d 6f 75 73 20 66 74 |via anon|ymous ft|
|000007d0| 70 20 6f 6e 20 66 74 70 | 2e 61 70 70 6c 65 2e 63 |p on ftp|.apple.c|
|000007e0| 6f 6d 2e 0d 09 0d 0d 45 | 44 49 54 4f 52 49 41 4c |om.....E|DITORIAL|
|000007f0| 0d 43 41 52 4f 4c 49 4e | 45 20 52 4f 53 45 0d 44 |.CAROLIN|E ROSE.D|
|00000800| 65 61 72 20 52 65 61 64 | 65 72 73 2c 0d 49 6e 20 |ear Read|ers,.In |
|00000810| 4d 61 79 20 6f 66 20 6c | 61 73 74 20 79 65 61 72 |May of l|ast year|
|00000820| 2c 20 49 20 73 63 68 6d | 6f 6f 7a 65 64 20 77 69 |, I schm|oozed wi|
|00000830| 74 68 20 61 20 6c 6f 74 | 20 6f 66 20 64 65 76 65 |th a lot| of deve|
|00000840| 6c 6f 70 65 72 73 20 61 | 74 20 41 70 70 6c 65 d5 |lopers a|t Apple.|
|00000850| 73 20 57 6f 72 6c 64 77 | 69 64 65 20 44 65 76 65 |s Worldw|ide Deve|
|00000860| 6c 6f 70 65 72 d5 73 20 | 43 6f 6e 66 65 72 65 6e |loper.s |Conferen|
|00000870| 63 65 2c 20 61 6e 64 20 | 6f 6e 65 20 6f 66 20 74 |ce, and |one of t|
|00000880| 68 65 20 73 75 62 6a 65 | 63 74 73 20 74 68 61 74 |he subje|cts that|
|00000890| 20 63 61 6d 65 20 75 70 | 20 77 61 73 20 64 6f 63 | came up| was doc|
|000008a0| 75 6d 65 6e 74 61 74 69 | 6f 6e 2e 20 49 20 65 78 |umentati|on. I ex|
|000008b0| 70 72 65 73 73 65 64 20 | 6d 79 20 69 64 65 61 73 |pressed |my ideas|
|000008c0| 20 6f 6e 20 74 68 69 73 | 20 73 75 62 6a 65 63 74 | on this| subject|
|000008d0| 20 73 6f 6d 65 77 68 61 | 74 20 68 65 73 69 74 61 | somewha|t hesita|
|000008e0| 6e 74 6c 79 2c 20 62 65 | 63 61 75 73 65 20 49 20 |ntly, be|cause I |
|000008f0| 74 68 6f 75 67 68 74 20 | 74 68 65 20 74 72 75 74 |thought |the trut|
|00000900| 68 73 20 49 20 77 61 73 | 20 73 70 6f 75 74 69 6e |hs I was| spoutin|
|00000910| 67 20 77 65 72 65 20 61 | 6c 6c 20 70 72 65 74 74 |g were a|ll prett|
|00000920| 79 20 6f 62 76 69 6f 75 | 73 2c 20 62 75 74 20 49 |y obviou|s, but I|
|00000930| 20 77 61 73 20 73 75 72 | 70 72 69 73 65 64 20 74 | was sur|prised t|
|00000940| 6f 20 66 69 6e 64 20 74 | 68 61 74 20 73 65 76 65 |o find t|hat seve|
|00000950| 72 61 6c 20 64 65 76 65 | 6c 6f 70 65 72 73 20 73 |ral deve|lopers s|
|00000960| 65 65 6d 65 64 20 65 6e | 6c 69 67 68 74 65 6e 65 |eemed en|lightene|
|00000970| 64 20 62 79 20 74 68 65 | 6d 20 61 6e 64 20 65 76 |d by the|m and ev|
|00000980| 65 6e 20 73 75 67 67 65 | 73 74 65 64 20 74 68 69 |en sugge|sted thi|
|00000990| 73 20 61 73 20 61 20 74 | 6f 70 69 63 20 66 6f 72 |s as a t|opic for|
|000009a0| 20 61 20 64 65 76 65 6c | 6f 70 20 65 64 69 74 6f | a devel|op edito|
|000009b0| 72 69 61 6c 2e 20 53 6f | 20 68 65 72 65 20 67 6f |rial. So| here go|
|000009c0| 65 73 2e 0d 42 75 74 20 | 66 69 72 73 74 2c 20 73 |es..But |first, s|
|000009d0| 6f 6d 65 20 6d 6f 74 69 | 76 61 74 69 6f 6e 2e 20 |ome moti|vation. |
|000009e0| 49 66 20 79 6f 75 d5 72 | 65 20 6f 6e 65 20 6f 66 |If you.r|e one of|
|000009f0| 20 74 68 6f 73 65 20 64 | 65 76 65 6c 6f 70 65 72 | those d|eveloper|
|00000a00| 73 20 77 68 6f 20 74 68 | 69 6e 6b 20 6e 6f 20 6f |s who th|ink no o|
|00000a10| 6e 65 20 72 65 61 64 73 | 20 6d 61 6e 75 61 6c 73 |ne reads| manuals|
|00000a20| 20 61 6e 79 77 61 79 2c | 20 68 61 73 20 69 74 20 | anyway,| has it |
|00000a30| 6f 63 63 75 72 72 65 64 | 20 74 6f 20 79 6f 75 20 |occurred| to you |
|00000a40| 74 68 61 74 20 74 68 69 | 73 20 6d 69 67 68 74 20 |that thi|s might |
|00000a50| 62 65 20 61 20 73 65 6c | 66 2d 66 75 6c 66 69 6c |be a sel|f-fulfil|
|00000a60| 6c 69 6e 67 20 70 72 6f | 70 68 65 63 79 3f 20 49 |ling pro|phecy? I|
|00000a70| 66 20 6d 61 6e 75 61 6c | 73 20 77 65 72 65 20 62 |f manual|s were b|
|00000a80| 65 74 74 65 72 2c 20 6d | 61 79 62 65 20 70 65 6f |etter, m|aybe peo|
|00000a90| 70 6c 65 20 77 6f 75 6c | 64 20 72 65 61 64 20 74 |ple woul|d read t|
|00000aa0| 68 65 6d 2e 20 41 6c 73 | 6f 2c 20 63 75 73 74 6f |hem. Als|o, custo|
|00000ab0| 6d 65 72 73 20 77 68 6f | 20 64 6f 20 6e 65 76 65 |mers who| do neve|
|00000ac0| 72 20 72 65 61 64 20 74 | 68 65 20 6d 61 6e 75 61 |r read t|he manua|
|00000ad0| 6c 20 77 69 6c 6c 20 6e | 65 76 65 72 20 6c 65 61 |l will n|ever lea|
|00000ae0| 72 6e 20 74 68 65 20 66 | 75 6c 6c 20 70 6f 77 65 |rn the f|ull powe|
|00000af0| 72 20 6f 66 20 79 6f 75 | 72 20 70 72 6f 64 75 63 |r of you|r produc|
|00000b00| 74 20 28 70 72 6f 62 61 | 62 6c 79 20 6e 6f 74 20 |t (proba|bly not |
|00000b10| 65 76 65 72 79 20 66 65 | 61 74 75 72 65 20 69 73 |every fe|ature is|
|00000b20| 20 73 65 6c 66 2d 65 78 | 70 6c 61 6e 61 74 6f 72 | self-ex|planator|
|00000b30| 79 29 20 61 6e 64 20 77 | 69 6c 6c 20 62 65 20 74 |y) and w|ill be t|
|00000b40| 68 61 74 20 6d 75 63 68 | 20 71 75 69 63 6b 65 72 |hat much| quicker|
|00000b50| 20 74 6f 20 6d 6f 76 65 | 20 6f 6e 20 77 68 65 6e | to move| on when|
|00000b60| 20 73 6f 6d 65 6f 6e 65 | 20 73 68 6f 77 73 20 74 | someone| shows t|
|00000b70| 68 65 6d 20 74 68 65 20 | 67 72 65 61 74 20 74 68 |hem the |great th|
|00000b80| 69 6e 67 73 20 61 20 72 | 69 76 61 6c 20 70 72 6f |ings a r|ival pro|
|00000b90| 64 75 63 74 20 63 61 6e | 20 64 6f 2e 20 4d 6f 72 |duct can| do. Mor|
|00000ba0| 65 20 6c 69 6b 65 6c 79 | 2c 20 70 65 6f 70 6c 65 |e likely|, people|
|00000bb0| 20 67 6c 61 6e 63 65 20 | 61 74 20 74 68 65 20 6d | glance |at the m|
|00000bc0| 61 6e 75 61 6c 20 74 6f | 20 67 65 74 20 73 74 61 |anual to| get sta|
|00000bd0| 72 74 65 64 20 61 6e 64 | 20 74 68 65 6e 20 74 68 |rted and| then th|
|00000be0| 75 6d 62 20 74 68 72 6f | 75 67 68 20 69 74 20 6c |umb thro|ugh it l|
|00000bf0| 61 74 65 72 20 77 68 65 | 6e 20 74 68 65 79 20 77 |ater whe|n they w|
|00000c00| 61 6e 74 20 74 6f 20 65 | 78 70 6c 6f 72 65 20 63 |ant to e|xplore c|
|00000c10| 65 72 74 61 69 6e 20 66 | 65 61 74 75 72 65 73 2e |ertain f|eatures.|
|00000c20| 0d 41 6c 73 6f 20 6b 65 | 65 70 20 69 6e 20 6d 69 |.Also ke|ep in mi|
|00000c30| 6e 64 20 74 68 61 74 20 | 61 20 73 68 6f 64 64 79 |nd that |a shoddy|
|00000c40| 20 6d 61 6e 75 61 6c 20 | 77 69 6c 6c 20 62 65 20 | manual |will be |
|00000c50| 73 65 65 6e 20 61 73 20 | 61 20 72 65 66 6c 65 63 |seen as |a reflec|
|00000c60| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 70 72 6f 64 |tion of |the prod|
|00000c70| 75 63 74 20 61 73 20 61 | 20 77 68 6f 6c 65 3a 20 |uct as a| whole: |
|00000c80| d2 49 66 20 74 68 69 73 | 20 69 73 20 74 68 65 20 |.If this| is the |
|00000c90| 62 65 73 74 20 74 68 65 | 79 20 63 6f 75 6c 64 20 |best the|y could |
|00000ca0| 64 6f 20 6f 6e 20 74 68 | 65 20 6d 61 6e 75 61 6c |do on th|e manual|
|00000cb0| 2c 20 68 6f 77 20 67 6f | 6f 64 20 63 61 6e 20 74 |, how go|od can t|
|00000cc0| 68 65 69 72 20 73 6f 66 | 74 77 61 72 65 20 62 65 |heir sof|tware be|
|00000cd0| 3f d3 20 44 6f 6e d5 74 | 20 66 6f 6f 6c 20 79 6f |?. Don.t| fool yo|
|00000ce0| 75 72 73 65 6c 66 20 74 | 68 61 74 20 6f 6e 6c 79 |urself t|hat only|
|00000cf0| 20 77 72 69 74 65 72 73 | 20 6f 72 20 65 64 69 74 | writers| or edit|
|00000d00| 6f 72 73 20 77 69 6c 6c | 20 63 72 69 74 69 63 69 |ors will| critici|
|00000d10| 7a 65 20 61 20 70 6f 6f | 72 6c 79 20 64 6f 6e 65 |ze a poo|rly done|
|00000d20| 20 6d 61 6e 75 61 6c 3b | 20 61 6e 79 20 72 65 61 | manual;| any rea|
|00000d30| 64 65 72 20 77 68 6f 20 | 68 61 73 20 74 72 6f 75 |der who |has trou|
|00000d40| 62 6c 65 20 6c 65 61 72 | 6e 69 6e 67 20 66 72 6f |ble lear|ning fro|
|00000d50| 6d 20 69 74 20 77 69 6c | 6c 20 63 6f 6d 70 6c 61 |m it wil|l compla|
|00000d60| 69 6e 2c 20 61 6e 64 20 | 6e 6f 74 20 6a 75 73 74 |in, and |not just|
|00000d70| 20 74 6f 20 74 68 65 6d | 73 65 6c 76 65 73 2e 20 | to them|selves. |
|00000d80| 57 68 69 6c 65 20 74 68 | 65 72 65 20 61 72 65 20 |While th|ere are |
|00000d90| 74 69 6d 65 73 20 77 68 | 65 6e 20 63 6f 6e 73 69 |times wh|en consi|
|00000da0| 73 74 65 6e 63 79 20 6d | 61 79 20 62 65 20 74 68 |stency m|ay be th|
|00000db0| 65 20 68 6f 62 67 6f 62 | 6c 69 6e 20 6f 66 20 73 |e hobgob|lin of s|
|00000dc0| 6d 61 6c 6c 20 6d 69 6e | 64 73 2c 20 69 74 d5 73 |mall min|ds, it.s|
|00000dd0| 20 6f 66 74 65 6e 20 74 | 68 65 20 63 61 73 65 20 | often t|he case |
|00000de0| 74 68 61 74 20 69 6e 63 | 6f 6e 73 69 73 74 65 6e |that inc|onsisten|
|00000df0| 74 20 70 72 65 73 65 6e | 74 61 74 69 6f 6e 20 6f |t presen|tation o|
|00000e00| 72 20 74 65 72 6d 69 6e | 6f 6c 6f 67 79 20 77 69 |r termin|ology wi|
|00000e10| 6c 6c 20 63 6f 6e 66 75 | 73 65 20 72 65 61 64 65 |ll confu|se reade|
|00000e20| 72 73 20 61 6e 64 20 68 | 61 76 65 20 74 68 65 6d |rs and h|ave them|
|00000e30| 20 74 68 72 6f 77 69 6e | 67 20 79 6f 75 72 20 6d | throwin|g your m|
|00000e40| 61 6e 75 61 6c 20 64 6f | 77 6e 20 69 6e 20 64 69 |anual do|wn in di|
|00000e50| 73 67 75 73 74 20 61 6e | 64 20 74 68 69 6e 6b 69 |sgust an|d thinki|
|00000e60| 6e 67 20 79 6f 75 72 20 | 70 72 6f 64 75 63 74 20 |ng your |product |
|00000e70| 69 73 20 6d 6f 72 65 20 | 63 6f 6d 70 6c 69 63 61 |is more |complica|
|00000e80| 74 65 64 20 74 68 61 6e | 20 69 74 20 72 65 61 6c |ted than| it real|
|00000e90| 6c 79 20 69 73 2e 20 41 | 6e 64 20 70 65 6f 70 6c |ly is. A|nd peopl|
|00000ea0| 65 20 77 68 6f 20 64 6f | 20 6b 6e 6f 77 20 74 68 |e who do| know th|
|00000eb0| 69 6e 67 73 20 6c 69 6b | 65 20 74 68 65 20 64 69 |ings lik|e the di|
|00000ec0| 66 66 65 72 65 6e 63 65 | 20 62 65 74 77 65 65 6e |fference| between|
|00000ed0| 20 d2 69 74 73 d3 20 61 | 6e 64 20 d2 69 74 d5 73 | .its. a|nd .it.s|
|00000ee0| d3 20 77 69 6c 6c 20 77 | 6f 6e 64 65 72 20 68 6f |. will w|onder ho|
|00000ef0| 77 20 77 65 6c 6c 20 79 | 6f 75 20 64 65 62 75 67 |w well y|ou debug|
|00000f00| 67 65 64 20 79 6f 75 72 | 20 63 6f 64 65 20 69 66 |ged your| code if|
|00000f10| 20 79 6f 75 20 63 6f 75 | 6c 64 6e d5 74 20 66 69 | you cou|ldn.t fi|
|00000f20| 6e 64 20 6d 69 73 74 61 | 6b 65 73 20 6c 69 6b 65 |nd mista|kes like|
|00000f30| 20 74 68 69 73 20 69 6e | 20 79 6f 75 72 20 6d 61 | this in| your ma|
|00000f40| 6e 75 61 6c 2e 20 42 61 | 73 69 63 61 6c 6c 79 2c |nual. Ba|sically,|
|00000f50| 20 79 6f 75 20 77 6f 6e | d5 74 20 6c 6f 6f 6b 20 | you won|.t look |
|00000f60| 6c 69 6b 65 20 61 20 63 | 6c 61 73 73 20 61 63 74 |like a c|lass act|
|00000f70| 2e 0d 49 d5 6c 6c 20 73 | 74 61 74 65 20 74 68 65 |..I.ll s|tate the|
|00000f80| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 70 6f 69 6e 74 | followi|ng point|
|00000f90| 73 20 77 69 74 68 20 75 | 73 65 72 20 64 6f 63 75 |s with u|ser docu|
|00000fa0| 6d 65 6e 74 61 74 69 6f | 6e 20 69 6e 20 6d 69 6e |mentatio|n in min|
|00000fb0| 64 2c 20 74 68 6f 75 67 | 68 20 6d 6f 73 74 20 6f |d, thoug|h most o|
|00000fc0| 66 20 74 68 65 6d 20 61 | 6c 73 6f 20 61 70 70 6c |f them a|lso appl|
|00000fd0| 79 20 74 6f 20 74 65 63 | 68 6e 69 63 61 6c 20 64 |y to tec|hnical d|
|00000fe0| 6f 63 75 6d 65 6e 74 61 | 74 69 6f 6e 20 66 6f 72 |ocumenta|tion for|
|00000ff0| 20 64 65 76 65 6c 6f 70 | 65 72 73 2e 20 53 6f 6d | develop|ers. Som|
|00001000| 65 20 70 6f 69 6e 74 73 | 20 6d 61 79 20 62 65 20 |e points| may be |
|00001010| 75 73 65 66 75 6c 20 6f | 6e 6c 79 20 74 6f 20 73 |useful o|nly to s|
|00001020| 6d 61 6c 6c 20 63 6f 6d | 70 61 6e 69 65 73 2c 20 |mall com|panies, |
|00001030| 62 75 74 20 74 68 65 72 | 65 20 73 68 6f 75 6c 64 |but ther|e should|
|00001040| 20 62 65 20 73 6f 6d 65 | 74 68 69 6e 67 20 68 65 | be some|thing he|
|00001050| 72 65 20 66 6f 72 20 65 | 76 65 72 79 6f 6e 65 2e |re for e|veryone.|
|00001060| 0d a5 09 47 65 74 20 61 | 20 74 65 63 68 6e 69 63 |...Get a| technic|
|00001070| 61 6c 20 77 72 69 74 65 | 72 20 74 6f 20 77 72 69 |al write|r to wri|
|00001080| 74 65 20 79 6f 75 72 20 | 64 6f 63 75 6d 65 6e 74 |te your |document|
|00001090| 61 74 69 6f 6e 2e 20 44 | 6f 6e d5 74 20 64 6f 20 |ation. D|on.t do |
|000010a0| 69 74 20 79 6f 75 72 73 | 65 6c 66 d1 61 6e 64 20 |it yours|elf.and |
|000010b0| 74 72 79 20 74 6f 20 74 | 61 6c 6b 20 74 68 65 20 |try to t|alk the |
|000010c0| 43 45 4f 20 6f 72 20 56 | 50 20 6f 66 20 4d 61 72 |CEO or V|P of Mar|
|000010d0| 6b 65 74 69 6e 67 20 6f | 75 72 20 6f 66 20 64 6f |keting o|ur of do|
|000010e0| 69 6e 67 20 69 74 2e 20 | 43 6f 6e 74 72 61 72 79 |ing it. |Contrary|
|000010f0| 20 74 6f 20 6d 61 6e 79 | 20 70 65 6f 70 6c 65 d5 | to many| people.|
|00001100| 73 20 6f 70 69 6e 69 6f | 6e 73 2c 20 77 72 69 74 |s opinio|ns, writ|
|00001110| 69 6e 67 20 61 20 6d 61 | 6e 75 61 6c 20 69 73 0d |ing a ma|nual is.|
|00001120| 09 6e 6f 74 20 73 6f 6d | 65 74 68 69 6e 67 20 61 |.not som|ething a|
|00001130| 6e 79 20 73 6d 61 72 74 | 20 70 65 72 73 6f 6e 20 |ny smart| person |
|00001140| 63 61 6e 20 64 6f 3b 20 | 69 74 d5 73 20 61 20 73 |can do; |it.s a s|
|00001150| 6b 69 6c 6c 20 6c 69 6b | 65 20 61 6e 79 20 6f 74 |kill lik|e any ot|
|00001160| 68 65 72 2e 20 4d 6f 73 | 74 20 6c 69 6b 65 6c 79 |her. Mos|t likely|
|00001170| 20 79 6f 75 20 61 72 65 | 20 6e 6f 20 6d 6f 72 65 | you are| no more|
|00001180| 20 71 75 61 6c 69 66 69 | 65 64 20 74 6f 20 77 72 | qualifi|ed to wr|
|00001190| 69 74 65 20 74 68 65 20 | 64 6f 63 75 6d 65 6e 74 |ite the |document|
|000011a0| 61 74 69 6f 6e 20 74 68 | 61 6e 20 61 20 77 72 69 |ation th|an a wri|
|000011b0| 74 65 72 20 69 73 20 71 | 75 61 6c 69 66 69 65 64 |ter is q|ualified|
|000011c0| 20 74 6f 20 77 72 69 74 | 65 20 79 6f 75 72 20 63 | to writ|e your c|
|000011d0| 6f 64 65 2e 20 0d a5 09 | 4c 6f 6f 6b 20 6f 76 65 |ode. ...|Look ove|
|000011e0| 72 20 61 20 72 65 6c 65 | 76 61 6e 74 20 77 72 69 |r a rele|vant wri|
|000011f0| 74 69 6e 67 20 73 61 6d | 70 6c 65 20 66 72 6f 6d |ting sam|ple from|
|00001200| 20 79 6f 75 72 20 70 72 | 6f 73 70 65 63 74 69 76 | your pr|ospectiv|
|00001210| 65 20 77 72 69 74 65 72 | 2e 20 41 77 61 72 64 73 |e writer|. Awards|
|00001220| 2c 20 63 65 72 74 69 66 | 69 63 61 74 65 73 2c 20 |, certif|icates, |
|00001230| 61 6e 64 20 79 65 61 72 | 73 20 6f 66 20 65 78 70 |and year|s of exp|
|00001240| 65 72 69 65 6e 63 65 20 | 67 6f 20 6f 6e 6c 79 20 |erience |go only |
|00001250| 73 6f 20 66 61 72 3a 20 | 6e 6f 74 68 69 6e 67 20 |so far: |nothing |
|00001260| 77 69 6c 6c 20 74 65 6c | 6c 20 79 6f 75 20 77 68 |will tel|l you wh|
|00001270| 65 74 68 65 72 20 79 6f | 75 d5 6c 6c 20 67 65 74 |ether yo|u.ll get|
|00001280| 20 61 20 67 6f 6f 64 20 | 6d 61 6e 75 61 6c 20 61 | a good |manual a|
|00001290| 73 20 6d 75 63 68 20 61 | 73 20 6c 6f 6f 6b 69 6e |s much a|s lookin|
|000012a0| 67 20 61 74 20 70 61 73 | 74 20 77 6f 72 6b 2e 20 |g at pas|t work. |
|000012b0| 41 73 6b 20 68 6f 77 20 | 74 68 65 20 6d 61 74 65 |Ask how |the mate|
|000012c0| 72 69 61 6c 20 66 6f 72 | 20 74 68 65 20 73 61 6d |rial for| the sam|
|000012d0| 70 6c 65 20 77 61 73 20 | 67 61 74 68 65 72 65 64 |ple was |gathered|
|000012e0| 2c 20 77 68 6f 20 65 6c | 73 65 20 63 6f 6e 74 72 |, who el|se contr|
|000012f0| 69 62 75 74 65 64 20 74 | 6f 20 69 74 2c 20 61 6e |ibuted t|o it, an|
|00001300| 64 20 68 6f 77 20 68 65 | 61 76 69 6c 79 20 69 74 |d how he|avily it|
|00001310| 20 77 61 73 20 65 64 69 | 74 65 64 2e 0d a5 09 47 | was edi|ted....G|
|00001320| 65 74 20 74 68 65 20 77 | 72 69 74 65 72 20 73 74 |et the w|riter st|
|00001330| 61 72 74 65 64 20 65 61 | 72 6c 79 20 69 6e 20 74 |arted ea|rly in t|
|00001340| 68 65 20 70 72 6f 63 65 | 73 73 20 d1 20 6c 6f 6e |he proce|ss . lon|
|00001350| 67 20 62 65 66 6f 72 65 | 20 74 68 65 20 66 65 61 |g before| the fea|
|00001360| 74 75 72 65 20 73 65 74 | 20 69 73 20 66 72 6f 7a |ture set| is froz|
|00001370| 65 6e 2e 20 57 72 69 74 | 65 72 73 20 70 72 6f 76 |en. Writ|ers prov|
|00001380| 69 64 65 20 61 20 76 61 | 6c 75 61 62 6c 65 20 70 |ide a va|luable p|
|00001390| 65 72 73 70 65 63 74 69 | 76 65 20 6f 66 20 79 6f |erspecti|ve of yo|
|000013a0| 75 72 20 70 72 6f 64 75 | 63 74 2c 20 6e 6f 74 20 |ur produ|ct, not |
|000013b0| 75 6e 6c 69 6b 65 20 74 | 68 61 74 20 6f 66 20 70 |unlike t|hat of p|
|000013c0| 72 6f 64 75 63 74 20 6d | 61 6e 61 67 65 6d 65 6e |roduct m|anagemen|
|000013d0| 74 2e 20 54 68 65 79 d5 | 6c 6c 20 68 65 6c 70 20 |t. They.|ll help |
|000013e0| 77 69 74 68 20 74 68 65 | 20 64 65 73 69 67 6e 20 |with the| design |
|000013f0| 6f 66 20 74 68 65 20 70 | 72 6f 64 75 63 74 2c 20 |of the p|roduct, |
|00001400| 74 65 6c 6c 69 6e 67 20 | 79 6f 75 20 77 68 61 74 |telling |you what|
|00001410| 20 66 65 61 74 75 72 65 | 73 20 64 6f 6e d5 74 20 | feature|s don.t |
|00001420| 66 69 74 20 69 6e 20 77 | 69 74 68 20 6f 74 68 65 |fit in w|ith othe|
|00001430| 72 20 6f 6e 65 73 20 61 | 6e 64 20 70 6f 69 6e 74 |r ones a|nd point|
|00001440| 69 6e 67 20 6f 75 74 20 | 6c 6f 6f 70 68 6f 6c 65 |ing out |loophole|
|00001450| 73 2c 20 69 6e 63 6f 6e | 73 69 73 74 65 6e 63 69 |s, incon|sistenci|
|00001460| 65 73 2c 20 61 6e 64 20 | 6f 74 68 65 72 20 42 61 |es, and |other Ba|
|00001470| 64 20 54 68 69 6e 67 73 | 2e 20 41 6e 64 20 74 68 |d Things|. And th|
|00001480| 65 79 d5 72 65 20 74 79 | 70 69 63 61 6c 6c 79 20 |ey.re ty|pically |
|00001490| 65 78 63 65 6c 6c 65 6e | 74 20 62 75 67 20 66 69 |excellen|t bug fi|
|000014a0| 6e 64 65 72 73 2e 0d a5 | 09 48 61 76 65 20 74 68 |nders...|.Have th|
|000014b0| 65 20 64 6f 63 75 6d 65 | 6e 74 61 74 69 6f 6e 20 |e docume|ntation |
|000014c0| 65 64 69 74 65 64 20 62 | 79 20 61 6e 20 65 64 69 |edited b|y an edi|
|000014d0| 74 6f 72 2e 20 55 6e 6c | 65 73 73 20 74 68 65 79 |tor. Unl|ess they|
|000014e0| 20 61 6c 73 6f 20 68 61 | 70 70 65 6e 20 74 6f 20 | also ha|ppen to |
|000014f0| 62 65 20 65 64 69 74 6f | 72 73 2c 20 77 72 69 74 |be edito|rs, writ|
|00001500| 65 72 73 20 6e 65 65 64 | 20 74 68 65 69 72 20 77 |ers need| their w|
|00001510| 6f 72 6b 20 63 68 65 63 | 6b 65 64 20 6c 69 6b 65 |ork chec|ked like|
|00001520| 20 61 6e 79 6f 6e 65 20 | 65 6c 73 65 20 d1 20 61 | anyone |else . a|
|00001530| 6e 64 20 61 6e 20 65 6c | 65 63 74 72 6f 6e 69 63 |nd an el|ectronic|
|00001540| 20 73 70 65 6c 6c 69 6e | 67 20 6f 72 20 67 72 61 | spellin|g or gra|
|00001550| 6d 6d 61 72 20 63 68 65 | 63 6b 20 28 77 68 69 6c |mmar che|ck (whil|
|00001560| 65 20 61 20 67 6f 6f 64 | 20 73 74 61 72 74 29 20 |e a good| start) |
|00001570| 69 73 6e d5 74 20 65 6e | 6f 75 67 68 2e 0d a5 09 |isn.t en|ough....|
|00001580| 54 65 73 74 20 74 68 65 | 20 72 65 73 75 6c 74 20 |Test the| result |
|00001590| 6f 6e 20 75 73 65 72 73 | 2c 20 61 66 74 65 72 20 |on users|, after |
|000015a0| 79 6f 75 72 20 70 72 6f | 64 75 63 74 20 73 68 69 |your pro|duct shi|
|000015b0| 70 73 20 69 66 20 6e 6f | 74 20 73 6f 6f 6e 65 72 |ps if no|t sooner|
|000015c0| 20 28 79 6f 75 20 63 61 | 6e 20 72 65 76 69 73 65 | (you ca|n revise|
|000015d0| 20 74 68 65 20 64 6f 63 | 75 6d 65 6e 74 61 74 69 | the doc|umentati|
|000015e0| 6f 6e 20 66 6f 72 20 74 | 68 65 20 6e 65 78 74 20 |on for t|he next |
|000015f0| 70 72 69 6e 74 69 6e 67 | 29 2e 20 41 6e 64 20 64 |printing|). And d|
|00001600| 6f 6e d5 74 20 62 65 20 | 64 65 66 65 6e 73 69 76 |on.t be |defensiv|
|00001610| 65 3a 20 69 66 20 6f 6e | 6c 79 20 6f 6e 65 20 6f |e: if on|ly one o|
|00001620| 75 74 20 6f 66 20 74 65 | 6e 20 d2 74 65 73 74 65 |ut of te|n .teste|
|00001630| 72 73 d3 20 74 75 72 6e | 73 20 75 70 20 61 20 70 |rs. turn|s up a p|
|00001640| 61 72 74 69 63 75 6c 61 | 72 20 70 72 6f 62 6c 65 |articula|r proble|
|00001650| 6d 2c 20 69 74 20 6d 61 | 79 20 6d 65 61 6e 20 74 |m, it ma|y mean t|
|00001660| 68 61 74 20 31 30 25 20 | 6f 66 20 79 6f 75 72 20 |hat 10% |of your |
|00001670| 75 73 65 72 20 62 61 73 | 65 20 77 69 6c 6c 20 68 |user bas|e will h|
|00001680| 61 76 65 20 74 68 65 20 | 73 61 6d 65 20 70 72 6f |ave the |same pro|
|00001690| 62 6c 65 6d 2e 20 4a 75 | 64 67 65 20 6e 6f 20 6d |blem. Ju|dge no m|
|000016a0| 69 73 75 6e 64 65 72 73 | 74 61 6e 64 69 6e 67 20 |isunders|tanding |
|000016b0| 61 73 20 73 74 75 70 69 | 64 3b 20 74 68 65 79 d5 |as stupi|d; they.|
|000016c0| 72 65 20 61 6c 6c 20 76 | 61 6c 69 64 2c 20 6e 6f |re all v|alid, no|
|000016d0| 20 6d 61 74 74 65 72 20 | 68 6f 77 20 6d 75 63 68 | matter |how much|
|000016e0| 20 79 6f 75 20 6d 61 79 | 20 64 69 73 61 67 72 65 | you may| disagre|
|000016f0| 65 20 77 69 74 68 20 74 | 68 65 6d 2e 0d 49 20 63 |e with t|hem..I c|
|00001700| 6f 75 6c 64 20 67 6f 20 | 6f 6e 20 66 6f 72 65 76 |ould go |on forev|
|00001710| 65 72 2c 20 62 75 74 20 | 74 68 61 74 d5 73 20 65 |er, but |that.s e|
|00001720| 6e 6f 75 67 68 20 66 6f | 72 20 6e 6f 77 2e 20 50 |nough fo|r now. P|
|00001730| 6c 65 61 73 65 20 6d 61 | 6b 65 20 6d 79 20 64 61 |lease ma|ke my da|
|00001740| 79 20 61 6e 64 20 6c 65 | 74 20 6d 65 20 6b 6e 6f |y and le|t me kno|
|00001750| 77 20 69 66 20 79 6f 75 | 20 67 6f 74 20 61 6e 79 |w if you| got any|
|00001760| 74 68 69 6e 67 20 6f 66 | 20 76 61 6c 75 65 20 6f |thing of| value o|
|00001770| 75 74 20 6f 66 20 74 68 | 69 73 2e 20 4f 72 20 63 |ut of th|is. Or c|
|00001780| 72 69 74 69 63 69 7a 65 | 20 69 74 20 69 66 20 79 |riticize| it if y|
|00001790| 6f 75 20 6c 69 6b 65 3b | 20 49 20 63 61 6e 20 75 |ou like;| I can u|
|000017a0| 73 65 20 74 68 65 20 70 | 72 61 63 74 69 63 65 20 |se the p|ractice |
|000017b0| 69 6e 20 6e 6f 74 20 62 | 65 69 6e 67 20 64 65 66 |in not b|eing def|
|000017c0| 65 6e 73 69 76 65 2e 0d | 43 61 72 6f 6c 69 6e 65 |ensive..|Caroline|
|000017d0| 20 52 6f 73 65 0d 45 64 | 69 74 6f 72 0d 4c 45 54 | Rose.Ed|itor.LET|
|000017e0| 54 45 52 53 0d 54 45 43 | 48 20 4e 4f 54 45 53 3a |TERS.TEC|H NOTES:|
|000017f0| 20 57 4f 52 44 20 49 53 | 20 4f 55 54 0d 57 68 79 | WORD IS| OUT.Why|
|00001800| 20 61 72 65 20 74 68 65 | 20 54 65 63 68 20 4e 6f | are the| Tech No|
|00001810| 74 65 73 20 69 6e 20 4d | 69 63 72 6f 73 6f 66 74 |tes in M|icrosoft|
|00001820| 20 57 6f 72 64 20 64 6f | 63 75 6d 65 6e 74 73 3f | Word do|cuments?|
|00001830| 20 41 72 65 20 79 6f 75 | 20 61 73 73 75 6d 69 6e | Are you| assumin|
|00001840| 67 20 61 6c 6c 20 64 65 | 76 65 6c 6f 70 65 72 73 |g all de|velopers|
|00001850| 20 68 61 76 65 20 4d 69 | 63 72 6f 73 6f 66 74 20 | have Mi|crosoft |
|00001860| 57 6f 72 64 3f 20 49 20 | 64 6f 6e d5 74 20 74 68 |Word? I |don.t th|
|00001870| 69 6e 6b 20 74 68 69 73 | 20 69 73 20 61 20 67 6f |ink this| is a go|
|00001880| 6f 64 20 61 73 73 75 6d | 70 74 69 6f 6e 2e 20 44 |od assum|ption. D|
|00001890| 65 76 65 6c 6f 70 65 72 | 73 20 77 68 6f 20 64 6f |eveloper|s who do|
|000018a0| 6e d5 74 20 68 61 76 65 | 20 4d 69 63 72 6f 73 6f |n.t have| Microso|
|000018b0| 66 74 20 57 6f 72 64 20 | 77 6f 75 6c 64 20 62 65 |ft Word |would be|
|000018c0| 20 72 65 71 75 69 72 65 | 64 20 74 6f 20 65 69 74 | require|d to eit|
|000018d0| 68 65 72 20 70 75 72 63 | 68 61 73 65 20 69 74 20 |her purc|hase it |
|000018e0| 6f 72 20 67 65 74 20 61 | 6e 20 69 6c 6c 65 67 61 |or get a|n illega|
|000018f0| 6c 20 63 6f 70 79 2e 20 | 4f 72 20 49 20 73 75 70 |l copy. |Or I sup|
|00001900| 70 6f 73 65 20 74 68 65 | 79 20 6d 69 67 68 74 20 |pose the|y might |
|00001910| 62 65 20 61 62 6c 65 20 | 74 6f 20 75 73 65 20 74 |be able |to use t|
|00001920| 68 65 69 72 20 66 61 76 | 6f 72 69 74 65 20 77 6f |heir fav|orite wo|
|00001930| 72 64 20 70 72 6f 63 65 | 73 73 6f 72 20 61 6e 64 |rd proce|ssor and|
|00001940| 20 63 6f 6e 76 65 72 74 | 20 74 68 65 20 54 65 63 | convert| the Tec|
|00001950| 68 20 4e 6f 74 65 73 20 | 69 66 20 73 75 63 68 20 |h Notes |if such |
|00001960| 63 6f 6e 76 65 72 74 65 | 72 73 20 65 78 69 73 74 |converte|rs exist|
|00001970| 2e 0d 42 69 67 20 64 65 | 76 65 6c 6f 70 65 72 73 |..Big de|velopers|
|00001980| 20 6d 61 79 20 68 61 76 | 65 20 74 68 65 20 63 61 | may hav|e the ca|
|00001990| 70 69 74 61 6c 20 74 6f | 20 70 75 72 63 68 61 73 |pital to| purchas|
|000019a0| 65 20 4d 69 63 72 6f 73 | 6f 66 74 20 57 6f 72 64 |e Micros|oft Word|
|000019b0| 20 62 75 74 20 73 6d 61 | 6c 6c 20 6f 72 20 73 74 | but sma|ll or st|
|000019c0| 61 72 74 69 6e 67 20 64 | 65 76 65 6c 6f 70 65 72 |arting d|eveloper|
|000019d0| 73 20 6d 61 79 20 6e 6f | 74 2c 20 65 73 70 65 63 |s may no|t, espec|
|000019e0| 69 61 6c 6c 79 20 74 68 | 6f 73 65 20 65 6e 74 68 |ially th|ose enth|
|000019f0| 75 73 69 61 73 74 69 63 | 20 61 6e 64 20 63 72 65 |usiastic| and cre|
|00001a00| 61 74 69 76 65 20 70 72 | 6f 67 72 61 6d 6d 65 72 |ative pr|ogrammer|
|00001a10| 73 20 69 6e 20 73 63 68 | 6f 6f 6c 2e 20 49 74 20 |s in sch|ool. It |
|00001a20| 77 6f 75 6c 64 20 62 65 | 20 61 20 73 68 61 6d 65 |would be| a shame|
|00001a30| 20 74 6f 20 66 6f 72 63 | 65 20 74 68 65 6d 20 74 | to forc|e them t|
|00001a40| 6f 20 67 65 74 20 61 6e | 20 69 6c 6c 65 67 61 6c |o get an| illegal|
|00001a50| 20 63 6f 70 79 20 6f 66 | 20 4d 69 63 72 6f 73 6f | copy of| Microso|
|00001a60| 66 74 20 57 6f 72 64 20 | 73 6f 20 74 68 61 74 20 |ft Word |so that |
|00001a70| 74 68 65 79 20 63 6f 75 | 6c 64 20 6c 65 61 72 6e |they cou|ld learn|
|00001a80| 20 74 68 65 20 73 61 6d | 65 20 77 6f 6e 64 65 72 | the sam|e wonder|
|00001a90| 66 75 6c 20 6d 61 67 69 | 63 20 74 72 69 63 6b 73 |ful magi|c tricks|
|00001aa0| 20 74 68 61 74 20 6f 74 | 68 65 72 73 20 67 65 74 | that ot|hers get|
|00001ab0| 20 66 72 6f 6d 20 74 68 | 65 20 54 65 63 68 20 4e | from th|e Tech N|
|00001ac0| 6f 74 65 73 2e 0d 49 73 | 20 69 74 20 70 6f 73 73 |otes..Is| it poss|
|00001ad0| 69 62 6c 65 20 74 6f 20 | 70 72 6f 64 75 63 65 20 |ible to |produce |
|00001ae0| 74 68 65 20 54 65 63 68 | 20 4e 6f 74 65 73 20 69 |the Tech| Notes i|
|00001af0| 6e 20 61 20 6d 69 6e 69 | 6d 61 6c 20 74 65 78 74 |n a mini|mal text|
|00001b00| 20 65 64 69 74 6f 72 20 | 73 75 63 68 20 61 73 20 | editor |such as |
|00001b10| 54 65 61 63 68 54 65 78 | 74 20 6f 72 20 44 6f 63 |TeachTex|t or Doc|
|00001b20| 4d 61 6b 65 72 3f 20 4f | 72 20 62 65 74 74 65 72 |Maker? O|r better|
|00001b30| 20 79 65 74 2c 20 77 68 | 79 20 6e 6f 74 20 75 73 | yet, wh|y not us|
|00001b40| 65 20 41 70 70 6c 65 20 | 44 6f 63 56 69 65 77 65 |e Apple |DocViewe|
|00001b50| 72 20 6c 69 6b 65 20 74 | 68 65 20 4e 65 77 20 49 |r like t|he New I|
|00001b60| 6e 73 69 64 65 20 4d 61 | 63 69 6e 74 6f 73 68 20 |nside Ma|cintosh |
|00001b70| 64 6f 63 75 6d 65 6e 74 | 73 3f 0d d1 20 48 6f 6f |document|s?.. Hoo|
|00001b80| 6e 20 49 6d 0d 54 68 69 | 73 20 69 73 20 61 20 74 |n Im.Thi|s is a t|
|00001b90| 69 6d 65 6c 79 20 71 75 | 65 73 74 69 6f 6e 2c 20 |imely qu|estion, |
|00001ba0| 61 73 20 74 68 65 20 66 | 6f 72 6d 61 74 20 6f 66 |as the f|ormat of|
|00001bb0| 20 54 65 63 68 20 4e 6f | 74 65 73 20 6f 6e 20 74 | Tech No|tes on t|
|00001bc0| 68 65 20 43 44 20 68 61 | 73 20 63 68 61 6e 67 65 |he CD ha|s change|
|00001bd0| 64 2e 20 42 75 74 20 66 | 69 72 73 74 2c 20 73 6f |d. But f|irst, so|
|00001be0| 6d 65 20 62 61 63 6b 67 | 72 6f 75 6e 64 2e 0d 54 |me backg|round..T|
|00001bf0| 68 65 72 65 20 61 72 65 | 20 73 65 76 65 72 61 6c |here are| several|
|00001c00| 20 72 65 61 73 6f 6e 73 | 20 77 68 79 20 77 65 20 | reasons| why we |
|00001c10| 64 69 73 74 72 69 62 75 | 74 65 64 20 54 65 63 68 |distribu|ted Tech|
|00001c20| 20 4e 6f 74 65 73 20 61 | 73 20 4d 69 63 72 6f 73 | Notes a|s Micros|
|00001c30| 6f 66 74 20 57 6f 72 64 | 20 64 6f 63 75 6d 65 6e |oft Word| documen|
|00001c40| 74 73 2e 20 49 6e 74 65 | 72 6e 61 6c 6c 79 20 77 |ts. Inte|rnally w|
|00001c50| 65 20 75 73 65 20 4d 69 | 63 72 6f 73 6f 66 74 20 |e use Mi|crosoft |
|00001c60| 57 6f 72 64 20 61 73 20 | 74 68 65 20 61 75 74 68 |Word as |the auth|
|00001c70| 6f 72 69 6e 67 20 74 6f | 6f 6c 20 66 6f 72 20 54 |oring to|ol for T|
|00001c80| 65 63 68 20 4e 6f 74 65 | 73 20 62 65 63 61 75 73 |ech Note|s becaus|
|00001c90| 65 20 6f 66 20 69 74 73 | 20 72 65 6c 61 74 69 76 |e of its| relativ|
|00001ca0| 65 6c 79 20 70 6f 77 65 | 72 66 75 6c 20 66 6f 72 |ely powe|rful for|
|00001cb0| 6d 61 74 74 69 6e 67 20 | 61 62 69 6c 69 74 69 65 |matting |abilitie|
|00001cc0| 73 20 61 6e 64 20 65 61 | 73 65 20 6f 66 20 75 73 |s and ea|se of us|
|00001cd0| 65 2e 20 49 74 20 61 6c | 73 6f 20 74 75 72 6e 73 |e. It al|so turns|
|00001ce0| 20 6f 75 74 20 74 68 61 | 74 20 6d 6f 73 74 20 77 | out tha|t most w|
|00001cf0| 6f 72 64 20 70 72 6f 63 | 65 73 73 69 6e 67 20 70 |ord proc|essing p|
|00001d00| 61 63 6b 61 67 65 73 2c | 20 73 75 63 68 20 61 73 |ackages,| such as|
|00001d10| 20 4d 61 63 57 72 69 74 | 65 a8 20 49 49 2c 20 68 | MacWrit|e. II, h|
|00001d20| 61 76 65 20 74 72 61 6e | 73 6c 61 74 6f 72 73 20 |ave tran|slators |
|00001d30| 74 68 61 74 20 64 6f 20 | 61 20 72 65 61 73 6f 6e |that do |a reason|
|00001d40| 61 62 6c 65 20 6a 6f 62 | 20 6f 6e 20 4d 69 63 72 |able job| on Micr|
|00001d50| 6f 73 6f 66 74 20 57 6f | 72 64 20 64 6f 63 75 6d |osoft Wo|rd docum|
|00001d60| 65 6e 74 73 2c 20 73 6f | 20 6d 6f 73 74 20 70 65 |ents, so| most pe|
|00001d70| 6f 70 6c 65 20 68 61 76 | 65 20 61 63 63 65 73 73 |ople hav|e access|
|00001d80| 20 74 6f 20 74 68 65 20 | 69 6e 66 6f 72 6d 61 74 | to the |informat|
|00001d90| 69 6f 6e 2e 20 57 65 d5 | 72 65 20 66 69 72 6d 6c |ion. We.|re firml|
|00001da0| 79 20 61 67 61 69 6e 73 | 74 20 70 69 72 61 74 69 |y agains|t pirati|
|00001db0| 6e 67 20 73 6f 66 74 77 | 61 72 65 21 20 09 41 6c |ng softw|are! .Al|
|00001dc0| 73 6f 2c 20 6f 75 72 20 | 70 72 69 6d 61 72 79 20 |so, our |primary |
|00001dd0| 63 6f 6d 6d 69 74 6d 65 | 6e 74 20 68 61 73 20 62 |commitme|nt has b|
|00001de0| 65 65 6e 20 74 6f 20 70 | 72 6f 76 69 64 69 6e 67 |een to p|roviding|
|00001df0| 20 74 68 65 20 68 69 67 | 68 65 73 74 20 71 75 61 | the hig|hest qua|
|00001e00| 6c 69 74 79 20 74 65 63 | 68 6e 69 63 61 6c 20 6d |lity tec|hnical m|
|00001e10| 61 74 65 72 69 61 6c 20 | 70 6f 73 73 69 62 6c 65 |aterial |possible|
|00001e20| 3b 20 72 61 74 68 65 72 | 20 74 68 61 6e 20 66 6f |; rather| than fo|
|00001e30| 63 75 73 69 6e 67 20 6f | 6e 20 66 6f 72 6d 61 74 |cusing o|n format|
|00001e40| 20 63 6f 6e 76 65 72 73 | 69 6f 6e 2c 20 77 65 20 | convers|ion, we |
|00001e50| 63 68 6f 73 65 20 74 6f | 20 69 6d 70 72 6f 76 65 |chose to| improve|
|00001e60| 20 74 68 65 20 6f 76 65 | 72 61 6c 6c 20 63 6f 6e | the ove|rall con|
|00001e70| 74 65 6e 74 20 61 6e 64 | 20 6f 72 67 61 6e 69 7a |tent and| organiz|
|00001e80| 61 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 54 65 63 |ation of| the Tec|
|00001e90| 68 20 4e 6f 74 65 73 2e | 20 4f 6e 6c 79 20 74 68 |h Notes.| Only th|
|00001ea0| 65 6e 20 77 65 72 65 20 | 77 65 20 72 65 61 64 79 |en were |we ready|
|00001eb0| 20 74 6f 20 74 75 72 6e | 20 6f 75 72 20 66 75 6c | to turn| our ful|
|00001ec0| 6c 20 61 74 74 65 6e 74 | 69 6f 6e 20 74 6f 20 74 |l attent|ion to t|
|00001ed0| 68 65 20 71 75 65 73 74 | 69 6f 6e 20 6f 66 20 66 |he quest|ion of f|
|00001ee0| 6f 72 6d 61 74 2e 0d 59 | 6f 75 20 6d 65 6e 74 69 |ormat..Y|ou menti|
|00001ef0| 6f 6e 20 41 70 70 6c 65 | 20 44 6f 63 56 69 65 77 |on Apple| DocView|
|00001f00| 65 72 20 61 73 20 61 20 | 70 6f 73 73 69 62 6c 65 |er as a |possible|
|00001f10| 20 61 6c 74 65 72 6e 61 | 74 69 76 65 20 66 6f 72 | alterna|tive for|
|00001f20| 6d 61 74 20 d1 20 77 65 | 20 68 61 76 65 20 69 6e |mat . we| have in|
|00001f30| 20 66 61 63 74 20 63 6f | 6e 76 65 72 74 65 64 20 | fact co|nverted |
|00001f40| 74 68 65 20 54 65 63 68 | 20 4e 6f 74 65 73 20 69 |the Tech| Notes i|
|00001f50| 6e 74 6f 20 41 70 70 6c | 65 20 44 6f 63 56 69 65 |nto Appl|e DocVie|
|00001f60| 77 65 72 20 66 6f 72 6d | 61 74 20 28 74 61 6b 65 |wer form|at (take|
|00001f70| 20 61 20 6c 6f 6f 6b 20 | 6f 6e 20 74 68 65 20 43 | a look |on the C|
|00001f80| 44 29 2e 20 4f 76 65 72 | 20 74 69 6d 65 20 74 68 |D). Over| time th|
|00001f90| 69 73 20 77 69 6c 6c 20 | 62 65 20 69 6d 70 72 6f |is will |be impro|
|00001fa0| 76 65 64 20 74 6f 20 70 | 72 6f 76 69 64 65 20 62 |ved to p|rovide b|
|00001fb0| 65 74 74 65 72 20 69 6e | 64 65 78 69 6e 67 20 61 |etter in|dexing a|
|00001fc0| 6e 64 20 63 72 6f 73 73 | 2d 72 65 66 65 72 65 6e |nd cross|-referen|
|00001fd0| 63 65 20 66 61 63 69 6c | 69 74 69 65 73 20 d1 20 |ce facil|ities . |
|00001fe0| 77 68 6f 73 65 20 61 62 | 73 65 6e 63 65 20 77 65 |whose ab|sence we|
|00001ff0| d5 76 65 20 62 65 65 6e | 20 70 61 69 6e 66 75 6c |.ve been| painful|
|00002000| 6c 79 20 61 77 61 72 65 | 20 6f 66 20 69 6e 20 74 |ly aware| of in t|
|00002010| 68 65 20 4d 69 63 72 6f | 73 6f 66 74 20 57 6f 72 |he Micro|soft Wor|
|00002020| 64 20 66 6f 72 6d 61 74 | 2e 0d d1 20 4e 65 69 6c |d format|... Neil|
|00002030| 20 44 61 79 2c 20 54 65 | 63 68 20 4e 6f 74 65 20 | Day, Te|ch Note |
|00002040| 50 6f 6f 68 2d 42 61 68 | 0d 4c 49 43 45 4e 53 49 |Pooh-Bah|.LICENSI|
|00002050| 4e 47 20 44 4f 43 56 49 | 45 57 45 52 0d 57 65 20 |NG DOCVI|EWER.We |
|00002060| 61 72 65 20 61 20 6c 6f | 6e 67 2d 74 69 6d 65 20 |are a lo|ng-time |
|00002070| 4d 61 63 69 6e 74 6f 73 | 68 20 65 64 75 63 61 74 |Macintos|h educat|
|00002080| 69 6f 6e 61 6c 20 73 6f | 66 74 77 61 72 65 20 64 |ional so|ftware d|
|00002090| 65 76 65 6c 6f 70 65 72 | 2e 20 57 65 d5 76 65 20 |eveloper|. We.ve |
|000020a0| 74 72 61 64 69 74 69 6f | 6e 61 6c 6c 79 20 63 6f |traditio|nally co|
|000020b0| 6e 76 65 72 74 65 64 20 | 6f 75 72 20 70 72 69 6e |nverted |our prin|
|000020c0| 74 65 64 20 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |ted docu|mentatio|
|000020d0| 6e 20 74 6f 20 48 79 70 | 65 72 43 61 72 64 a8 20 |n to Hyp|erCard. |
|000020e0| 66 6f 72 20 6f 6e 2d 6c | 69 6e 65 20 75 73 65 20 |for on-l|ine use |
|000020f0| 62 79 20 6f 75 72 20 63 | 75 73 74 6f 6d 65 72 73 |by our c|ustomers|
|00002100| 2e 20 49 20 77 6f 6e 64 | 65 72 65 64 20 74 6f 20 |. I wond|ered to |
|00002110| 77 68 6f 6d 20 77 65 20 | 73 68 6f 75 6c 64 20 73 |whom we |should s|
|00002120| 70 65 61 6b 20 74 6f 20 | 72 65 71 75 65 73 74 20 |peak to |request |
|00002130| 64 65 76 65 6c 6f 70 65 | 72 20 6c 69 63 65 6e 73 |develope|r licens|
|00002140| 69 6e 67 20 6f 66 20 41 | 70 70 6c 65 20 44 6f 63 |ing of A|pple Doc|
|00002150| 56 69 65 77 65 72 3f 0d | d1 52 68 65 74 74 20 54 |Viewer?.|.Rhett T|
|00002160| 69 6e 64 61 6c 6c 0d 41 | 70 70 6c 65 20 44 6f 63 |indall.A|pple Doc|
|00002170| 56 69 65 77 65 72 20 64 | 6f 63 75 6d 65 6e 74 73 |Viewer d|ocuments|
|00002180| 20 61 72 65 20 73 6f 75 | 72 63 65 64 20 66 72 6f | are sou|rced fro|
|00002190| 6d 20 73 65 76 65 72 61 | 6c 20 77 6f 72 64 20 70 |m severa|l word p|
|000021a0| 72 6f 63 65 73 73 6f 72 | 73 2e 20 54 68 65 73 65 |rocessor|s. These|
|000021b0| 20 64 6f 63 75 6d 65 6e | 74 73 20 6d 75 73 74 20 | documen|ts must |
|000021c0| 62 65 20 70 72 6f 63 65 | 73 73 65 64 20 69 6e 20 |be proce|ssed in |
|000021d0| 61 6e 6f 74 68 65 72 20 | 61 70 70 6c 69 63 61 74 |another |applicat|
|000021e0| 69 6f 6e 20 62 65 66 6f | 72 65 20 74 68 65 79 20 |ion befo|re they |
|000021f0| 62 65 63 6f 6d 65 20 44 | 6f 63 56 69 65 77 65 72 |become D|ocViewer|
|00002200| 20 64 6f 63 75 6d 65 6e | 74 73 2e 20 54 68 69 73 | documen|ts. This|
|00002210| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 69 73 20 | applica|tion is |
|00002220| 63 75 72 72 65 6e 74 6c | 79 20 6e 6f 74 20 6f 66 |currentl|y not of|
|00002230| 20 63 6f 6d 6d 65 72 63 | 69 61 6c 20 71 75 61 6c | commerc|ial qual|
|00002240| 69 74 79 20 61 6e 64 20 | 69 73 20 66 6f 72 20 41 |ity and |is for A|
|00002250| 70 70 6c 65 20 69 6e 74 | 65 72 6e 61 6c 20 75 73 |pple int|ernal us|
|00002260| 65 20 6f 6e 6c 79 2e 20 | 48 6f 77 65 76 65 72 2c |e only. |However,|
|00002270| 20 77 65 d5 72 65 20 69 | 6e 20 74 68 65 20 70 72 | we.re i|n the pr|
|00002280| 6f 63 65 73 73 20 6f 66 | 20 69 6e 76 65 73 74 69 |ocess of| investi|
|00002290| 67 61 74 69 6e 67 20 77 | 68 65 74 68 65 72 20 74 |gating w|hether t|
|000022a0| 6f 20 72 65 66 69 6e 65 | 20 74 68 65 20 61 70 70 |o refine| the app|
|000022b0| 6c 69 63 61 74 69 6f 6e | 20 61 6e 64 20 6d 61 6b |lication| and mak|
|000022c0| 65 20 69 74 20 61 76 61 | 69 6c 61 62 6c 65 20 6f |e it ava|ilable o|
|000022d0| 75 74 73 69 64 65 20 41 | 70 70 6c 65 2e 20 54 68 |utside A|pple. Th|
|000022e0| 69 73 20 70 72 6f 63 65 | 73 73 20 6d 61 79 20 74 |is proce|ss may t|
|000022f0| 61 6b 65 20 73 6f 6d 65 | 20 74 69 6d 65 20 61 6e |ake some| time an|
|00002300| 64 20 6d 61 79 20 6e 6f | 74 20 72 65 73 75 6c 74 |d may no|t result|
|00002310| 20 69 6e 20 70 72 6f 76 | 69 64 69 6e 67 20 74 68 | in prov|iding th|
|00002320| 65 20 73 6f 66 74 77 61 | 72 65 20 74 6f 20 65 78 |e softwa|re to ex|
|00002330| 74 65 72 6e 61 6c 20 70 | 61 72 74 69 65 73 2e 20 |ternal p|arties. |
|00002340| 50 6c 65 61 73 65 20 73 | 74 61 79 20 74 75 6e 65 |Please s|tay tune|
|00002350| 64 21 0d d1 49 6e 2d 59 | 75 6e 67 20 4b 69 6d 09 |d!..In-Y|ung Kim.|
|00002360| 0d 0d 41 53 59 4e 43 48 | 52 4f 4e 4f 55 53 20 52 |..ASYNCH|RONOUS R|
|00002370| 4f 55 54 49 4e 45 53 20 | 4f 4e 20 54 48 45 20 4d |OUTINES |ON THE M|
|00002380| 41 43 49 4e 54 4f 53 48 | 0d 4a 49 4d 20 4c 55 54 |ACINTOSH|.JIM LUT|
|00002390| 48 45 52 0d 54 68 65 20 | 4d 61 63 69 6e 74 6f 73 |HER.The |Macintos|
|000023a0| 68 20 68 61 73 20 61 6c | 77 61 79 73 20 73 75 70 |h has al|ways sup|
|000023b0| 70 6f 72 74 65 64 20 61 | 73 79 6e 63 68 72 6f 6e |ported a|synchron|
|000023c0| 6f 75 73 20 63 61 6c 6c | 73 20 74 6f 20 6d 61 6e |ous call|s to man|
|000023d0| 79 20 70 61 72 74 73 20 | 0d 6f 66 20 69 74 73 20 |y parts |.of its |
|000023e0| 6f 70 65 72 61 74 69 6e | 67 20 73 79 73 74 65 6d |operatin|g system|
|000023f0| 2e 20 54 68 69 73 20 61 | 72 74 69 63 6c 65 20 65 |. This a|rticle e|
|00002400| 78 70 61 6e 64 73 20 6f | 6e 20 74 68 65 20 69 6e |xpands o|n the in|
|00002410| 66 6f 72 6d 61 74 69 6f | 6e 20 66 6f 75 6e 64 20 |formatio|n found |
|00002420| 69 6e 20 49 6e 73 69 64 | 65 20 4d 61 63 69 6e 74 |in Insid|e Macint|
|00002430| 6f 73 68 20 62 79 20 74 | 65 6c 6c 69 6e 67 20 77 |osh by t|elling w|
|00002440| 68 65 6e 20 77 68 79 2c | 20 61 6e 64 20 68 6f 77 |hen why,| and how|
|00002450| 20 79 6f 75 20 73 68 6f | 75 6c 64 20 75 73 65 20 | you sho|uld use |
|00002460| 66 75 6e 63 74 69 6f 6e | 73 20 61 73 79 6e 63 68 |function|s asynch|
|00002470| 72 6f 6e 6f 75 73 6c 79 | 20 6f 6e 20 74 68 65 20 |ronously| on the |
|00002480| 4d 61 63 69 6e 74 6f 73 | 68 2e 20 49 74 20 69 6e |Macintos|h. It in|
|00002490| 63 6c 75 64 65 73 20 64 | 65 62 75 67 67 69 6e 67 |cludes d|ebugging|
|000024a0| 20 68 69 6e 74 73 20 61 | 6e 64 20 73 6f 6c 75 74 | hints a|nd solut|
|000024b0| 69 6f 6e 73 20 74 6f 20 | 70 72 6f 62 6c 65 6d 73 |ions to |problems|
|000024c0| 20 63 6f 6d 6d 6f 6e 6c | 79 20 65 6e 63 6f 75 6e | commonl|y encoun|
|000024d0| 74 65 72 65 64 20 77 68 | 65 6e 20 61 73 79 6e 63 |tered wh|en async|
|000024e0| 68 72 6f 6e 6f 75 73 20 | 63 61 6c 6c 73 20 61 72 |hronous |calls ar|
|000024f0| 65 20 75 73 65 64 2e 0d | 57 68 65 6e 20 63 61 6c |e used..|When cal|
|00002500| 6c 69 6e 67 20 61 20 72 | 6f 75 74 69 6e 65 20 73 |ling a r|outine s|
|00002510| 79 6e 63 68 72 6f 6e 6f | 75 73 6c 79 2c 20 79 6f |ynchrono|usly, yo|
|00002520| 75 72 20 70 72 6f 67 72 | 61 6d 20 70 61 73 73 65 |ur progr|am passe|
|00002530| 73 20 63 6f 6e 74 72 6f | 6c 20 74 6f 20 74 68 65 |s contro|l to the|
|00002540| 20 72 6f 75 74 69 6e 65 | 20 61 6e 64 20 64 6f 65 | routine| and doe|
|00002550| 73 6e d5 74 20 63 6f 6e | 74 69 6e 75 65 20 65 78 |sn.t con|tinue ex|
|00002560| 65 63 75 74 69 6f 6e 20 | 75 6e 74 69 6c 20 74 68 |ecution |until th|
|00002570| 65 20 72 6f 75 74 69 6e | 65 d5 73 20 77 6f 72 6b |e routin|e.s work|
|00002580| 20 68 61 73 20 63 6f 6d | 70 6c 65 74 65 64 20 28 | has com|pleted (|
|00002590| 65 69 74 68 65 72 20 73 | 75 63 63 65 73 73 66 75 |either s|uccessfu|
|000025a0| 6c 6c 79 20 6f 72 20 75 | 6e 73 75 63 63 65 73 73 |lly or u|nsuccess|
|000025b0| 66 75 6c 6c 79 29 2e 20 | 54 68 69 73 20 77 6f 75 |fully). |This wou|
|000025c0| 6c 64 20 62 65 20 6c 69 | 6b 65 20 67 69 76 69 6e |ld be li|ke givin|
|000025d0| 67 20 73 6f 6d 65 6f 6e | 65 20 61 20 74 61 73 6b |g someon|e a task|
|000025e0| 20 61 6e 64 20 74 68 65 | 6e 20 77 61 74 63 68 69 | and the|n watchi|
|000025f0| 6e 67 20 74 68 65 6d 20 | 70 65 72 66 6f 72 6d 20 |ng them |perform |
|00002600| 74 68 61 74 20 74 61 73 | 6b 2e 20 41 6c 74 68 6f |that tas|k. Altho|
|00002610| 75 67 68 20 74 68 65 20 | 74 61 73 6b 20 69 73 20 |ugh the |task is |
|00002620| 65 76 65 6e 74 75 61 6c | 6c 79 20 63 6f 6d 70 6c |eventual|ly compl|
|00002630| 65 74 65 64 2c 20 79 6f | 75 20 64 6f 6e d5 74 20 |eted, yo|u don.t |
|00002640| 67 65 74 20 61 6e 79 74 | 68 69 6e 67 20 64 6f 6e |get anyt|hing don|
|00002650| 65 20 77 68 69 6c 65 20 | 79 6f 75 20 77 61 74 63 |e while |you watc|
|00002660| 68 2e 20 0d 4f 6e 20 74 | 68 65 20 6f 74 68 65 72 |h. .On t|he other|
|00002670| 20 68 61 6e 64 2c 20 77 | 68 65 6e 20 63 61 6c 6c | hand, w|hen call|
|00002680| 69 6e 67 20 61 20 72 6f | 75 74 69 6e 65 20 61 73 |ing a ro|utine as|
|00002690| 79 6e 63 68 72 6f 6e 6f | 75 73 6c 79 2c 20 79 6f |ynchrono|usly, yo|
|000026a0| 75 72 20 70 72 6f 67 72 | 61 6d 20 70 61 73 73 65 |ur progr|am passe|
|000026b0| 73 20 63 6f 6e 74 72 6f | 6c 20 74 6f 20 74 68 65 |s contro|l to the|
|000026c0| 20 72 6f 75 74 69 6e 65 | 2c 20 61 6e 64 20 74 68 | routine|, and th|
|000026d0| 65 20 70 72 6f 67 72 61 | 6d d5 73 20 72 65 71 75 |e progra|m.s requ|
|000026e0| 65 73 74 20 69 73 20 70 | 6c 61 63 65 64 20 69 6e |est is p|laced in|
|000026f0| 20 61 20 71 75 65 75 65 | 20 6f 72 2c 20 69 66 20 | a queue| or, if |
|00002700| 74 68 65 20 71 75 65 75 | 65 20 69 73 20 65 6d 70 |the queu|e is emp|
|00002710| 74 79 2c 20 65 78 65 63 | 75 74 65 64 20 69 6d 6d |ty, exec|uted imm|
|00002720| 65 64 69 61 74 65 6c 79 | 3b 20 69 6e 20 65 69 74 |ediately|; in eit|
|00002730| 68 65 72 20 63 61 73 65 | 2c 20 63 6f 6e 74 72 6f |her case|, contro|
|00002740| 6c 20 72 65 74 75 72 6e | 73 20 74 6f 20 74 68 65 |l return|s to the|
|00002750| 20 70 72 6f 67 72 61 6d | 20 76 65 72 79 20 71 75 | program| very qu|
|00002760| 69 63 6b 6c 79 2c 20 65 | 76 65 6e 20 69 66 20 74 |ickly, e|ven if t|
|00002770| 68 65 20 72 65 71 75 65 | 73 74 20 63 61 6e d5 74 |he reque|st can.t|
|00002780| 20 62 65 20 65 78 65 63 | 75 74 65 64 20 75 6e 74 | be exec|uted unt|
|00002790| 69 6c 20 6c 61 74 65 72 | 2e 20 54 68 65 20 73 79 |il later|. The sy|
|000027a0| 73 74 65 6d 20 70 72 6f | 63 65 73 73 65 73 20 61 |stem pro|cesses a|
|000027b0| 6e 79 20 71 75 65 75 65 | 64 20 72 65 71 75 65 73 |ny queue|d reques|
|000027c0| 74 73 20 77 68 69 6c 65 | 20 79 6f 75 72 20 70 72 |ts while| your pr|
|000027d0| 6f 67 72 61 6d 20 69 73 | 20 66 72 65 65 20 74 6f |ogram is| free to|
|000027e0| 20 63 6f 6e 74 69 6e 75 | 65 20 65 78 65 63 75 74 | continu|e execut|
|000027f0| 69 6f 6e 2c 20 74 68 65 | 6e 20 69 6e 74 65 72 72 |ion, the|n interr|
|00002800| 75 70 74 73 20 79 6f 75 | 20 6c 61 74 65 72 20 77 |upts you| later w|
|00002810| 68 65 6e 20 74 68 65 20 | 72 65 71 75 65 73 74 20 |hen the |request |
|00002820| 69 73 20 63 6f 6d 70 6c | 65 74 65 64 2e 20 54 68 |is compl|eted. Th|
|00002830| 69 73 20 69 73 20 6c 69 | 6b 65 20 67 69 76 69 6e |is is li|ke givin|
|00002840| 67 20 73 6f 6d 65 6f 6e | 65 20 61 20 74 61 73 6b |g someon|e a task|
|00002850| 20 61 6e 64 20 67 6f 69 | 6e 67 20 62 61 63 6b 20 | and goi|ng back |
|00002860| 74 6f 20 79 6f 75 72 20 | 77 6f 72 6b 20 77 68 69 |to your |work whi|
|00002870| 6c 65 20 74 68 65 79 20 | 66 69 6e 69 73 68 20 74 |le they |finish t|
|00002880| 68 65 20 74 61 73 6b 2e | 20 49 6e 20 6d 6f 73 74 |he task.| In most|
|00002890| 20 63 61 73 65 73 2c 20 | 69 74 20 72 65 73 75 6c | cases, |it resul|
|000028a0| 74 73 20 69 6e 20 6d 6f | 72 65 20 77 6f 72 6b 20 |ts in mo|re work |
|000028b0| 62 65 69 6e 67 20 61 63 | 63 6f 6d 70 6c 69 73 68 |being ac|complish|
|000028c0| 65 64 20 64 75 72 69 6e | 67 20 74 68 65 20 73 61 |ed durin|g the sa|
|000028d0| 6d 65 20 70 65 72 69 6f | 64 20 6f 66 20 74 69 6d |me perio|d of tim|
|000028e0| 65 2e 20 46 69 67 75 72 | 65 20 31 20 69 6c 6c 75 |e. Figur|e 1 illu|
|000028f0| 73 74 72 61 74 65 73 20 | 74 68 65 20 64 69 66 66 |strates |the diff|
|00002900| 65 72 65 6e 63 65 20 62 | 65 74 77 65 65 6e 20 73 |erence b|etween s|
|00002910| 79 6e 63 68 72 6f 6e 6f | 75 73 20 61 6e 64 20 61 |ynchrono|us and a|
|00002920| 73 79 6e 63 68 72 6f 6e | 6f 75 73 20 63 61 6c 6c |synchron|ous call|
|00002930| 73 2e 0d 4f 6e 65 20 73 | 69 74 75 61 74 69 6f 6e |s..One s|ituation|
|00002940| 20 69 6e 20 77 68 69 63 | 68 20 79 6f 75 20 73 68 | in whic|h you sh|
|00002950| 6f 75 6c 64 6e d5 74 20 | 75 73 65 20 73 79 6e 63 |ouldn.t |use sync|
|00002960| 68 72 6f 6e 6f 75 73 20 | 63 61 6c 6c 73 20 69 73 |hronous |calls is|
|00002970| 20 77 68 65 6e 20 79 6f | 75 20 64 6f 6e d5 74 20 | when yo|u don.t |
|00002980| 6b 6e 6f 77 20 68 6f 77 | 20 6c 6f 6e 67 20 69 74 |know how| long it|
|00002990| 20 6d 61 79 20 74 61 6b | 65 20 66 6f 72 20 74 68 | may tak|e for th|
|000029a0| 65 20 6f 70 65 72 61 74 | 69 6f 6e 20 74 6f 20 63 |e operat|ion to c|
|000029b0| 6f 6d 70 6c 65 74 65 2c | 20 61 73 20 77 69 74 68 |omplete,| as with|
|000029c0| 20 74 68 65 20 50 50 43 | 20 54 6f 6f 6c 62 6f 78 | the PPC| Toolbox|
|000029d0| d5 73 20 50 50 43 49 6e | 66 6f 72 6d 20 66 75 6e |.s PPCIn|form fun|
|000029e0| 63 74 69 6f 6e 2c 20 66 | 6f 72 20 65 78 61 6d 70 |ction, f|or examp|
|000029f0| 6c 65 2e 20 50 50 43 49 | 6e 66 6f 72 6d 20 77 6f |le. PPCI|nform wo|
|00002a00| 6e d5 74 20 63 6f 6d 70 | 6c 65 74 65 20 75 6e 74 |n.t comp|lete unt|
|00002a10| 69 6c 20 61 6e 6f 74 68 | 65 72 20 70 72 6f 67 72 |il anoth|er progr|
|00002a20| 61 6d 20 61 74 74 65 6d | 70 74 73 20 74 6f 20 73 |am attem|pts to s|
|00002a30| 74 61 72 74 20 61 20 73 | 65 73 73 69 6f 6e 20 77 |tart a s|ession w|
|00002a40| 69 74 68 20 79 6f 75 72 | 20 70 72 6f 67 72 61 6d |ith your| program|
|00002a50| 2e 20 54 68 69 73 20 63 | 6f 75 6c 64 20 68 61 70 |. This c|ould hap|
|00002a60| 70 65 6e 20 69 6d 6d 65 | 64 69 61 74 65 6c 79 2c |pen imme|diately,|
|00002a70| 20 62 75 74 20 74 68 65 | 20 63 68 61 6e 63 65 73 | but the| chances|
|00002a80| 20 61 72 65 20 66 61 72 | 20 67 72 65 61 74 65 72 | are far| greater|
|00002a90| 20 74 68 61 74 20 69 74 | 20 77 6f 6e d5 74 2e 20 | that it| won.t. |
|00002aa0| 49 66 20 50 50 43 49 6e | 66 6f 72 6d 20 69 73 20 |If PPCIn|form is |
|00002ab0| 63 61 6c 6c 65 64 20 73 | 79 6e 63 68 72 6f 6e 6f |called s|ynchrono|
|00002ac0| 75 73 6c 79 2c 20 69 74 | 20 61 70 70 65 61 72 73 |usly, it| appears|
|00002ad0| 20 74 68 61 74 20 74 68 | 65 20 73 79 73 74 65 6d | that th|e system|
|00002ae0| 20 68 61 73 20 6c 6f 63 | 6b 65 64 20 75 70 20 62 | has loc|ked up b|
|00002af0| 65 63 61 75 73 65 20 74 | 68 65 20 75 73 65 72 20 |ecause t|he user |
|00002b00| 77 6f 6e d5 74 20 67 65 | 74 20 63 6f 6e 74 72 6f |won.t ge|t contro|
|00002b10| 6c 20 62 61 63 6b 20 75 | 6e 74 69 6c 20 74 68 65 |l back u|ntil the|
|00002b20| 20 63 61 6c 6c 20 63 6f | 6d 70 6c 65 74 65 73 2e | call co|mpletes.|
|00002b30| 20 49 66 20 79 6f 75 20 | 63 61 6c 6c 20 50 50 43 | If you |call PPC|
|00002b40| 49 6e 66 6f 72 6d 20 61 | 73 79 6e 63 68 72 6f 6e |Inform a|synchron|
|00002b50| 6f 75 73 6c 79 2c 20 69 | 74 20 64 6f 65 73 6e d5 |ously, i|t doesn.|
|00002b60| 74 20 6d 61 74 74 65 72 | 20 69 66 20 74 68 65 20 |t matter| if the |
|00002b70| 66 75 6e 63 74 69 6f 6e | 20 64 6f 65 73 6e d5 74 |function| doesn.t|
|00002b80| 20 63 6f 6d 70 6c 65 74 | 65 20 66 6f 72 20 6d 69 | complet|e for mi|
|00002b90| 6e 75 74 65 73 2c 20 68 | 6f 75 72 73 2c 20 6f 72 |nutes, h|ours, or|
|00002ba0| 20 65 76 65 6e 20 64 61 | 79 73 20 d1 20 79 6f 75 | even da|ys . you|
|00002bb0| 72 20 70 72 6f 67 72 61 | 6d 20 28 61 6e 64 20 74 |r progra|m (and t|
|00002bc0| 68 65 20 72 65 73 74 20 | 6f 66 20 74 68 65 20 73 |he rest |of the s|
|00002bd0| 79 73 74 65 6d 29 20 63 | 61 6e 20 63 6f 6e 74 69 |ystem) c|an conti|
|00002be0| 6e 75 65 20 6e 6f 72 6d | 61 6c 6c 79 2e 0d 0d 0d |nue norm|ally....|
|00002bf0| 46 69 67 75 72 65 20 31 | 0d 48 6f 77 20 53 79 6e |Figure 1|.How Syn|
|00002c00| 63 68 72 6f 6e 6f 75 73 | 20 61 6e 64 20 41 73 79 |chronous| and Asy|
|00002c10| 6e 63 68 72 6f 6e 6f 75 | 73 20 43 61 6c 6c 73 20 |nchronou|s Calls |
|00002c20| 57 6f 72 6b 0d 59 6f 75 | 20 73 68 6f 75 6c 64 20 |Work.You| should |
|00002c30| 61 6c 73 6f 20 61 76 6f | 69 64 20 73 79 6e 63 68 |also avo|id synch|
|00002c40| 72 6f 6e 6f 75 73 20 63 | 61 6c 6c 73 20 77 68 65 |ronous c|alls whe|
|00002c50| 6e 20 79 6f 75 20 63 61 | 6e d5 74 20 6b 6e 6f 77 |n you ca|n.t know|
|00002c60| 20 74 68 65 20 73 74 61 | 74 65 20 6f 66 20 74 68 | the sta|te of th|
|00002c70| 65 20 73 65 72 76 69 63 | 65 20 79 6f 75 d5 76 65 |e servic|e you.ve|
|00002c80| 20 61 73 6b 65 64 20 66 | 6f 72 2e 20 50 72 6f 67 | asked f|or. Prog|
|00002c90| 72 61 6d 20 63 6f 64 65 | 20 74 68 61 74 d5 73 20 |ram code| that.s |
|00002ca0| 70 61 72 74 20 6f 66 20 | 61 20 63 6f 6d 70 6c 65 |part of |a comple|
|00002cb0| 74 69 6f 6e 20 72 6f 75 | 74 69 6e 65 2c 20 56 42 |tion rou|tine, VB|
|00002cc0| 4c 20 74 61 73 6b 2c 20 | 54 69 6d 65 20 4d 61 6e |L task, |Time Man|
|00002cd0| 61 67 65 72 20 74 61 73 | 6b 2c 20 44 65 66 65 72 |ager tas|k, Defer|
|00002ce0| 72 65 64 20 54 61 73 6b | 20 4d 61 6e 61 67 65 72 |red Task| Manager|
|00002cf0| 20 74 61 73 6b 2c 20 6f | 72 20 69 6e 74 65 72 72 | task, o|r interr|
|00002d00| 75 70 74 20 68 61 6e 64 | 6c 65 72 20 69 73 20 65 |upt hand|ler is e|
|00002d10| 78 65 63 75 74 65 64 20 | 61 74 20 77 68 61 74 d5 |xecuted |at what.|
|00002d20| 73 20 63 6f 6d 6d 6f 6e | 6c 79 20 63 61 6c 6c 65 |s common|ly calle|
|00002d30| 64 20 69 6e 74 65 72 72 | 75 70 74 20 74 69 6d 65 |d interr|upt time|
|00002d40| 2e 20 53 79 6e 63 68 72 | 6f 6e 6f 75 73 20 63 61 |. Synchr|onous ca|
|00002d50| 6c 6c 73 20 6d 61 64 65 | 20 61 74 20 69 6e 74 65 |lls made| at inte|
|00002d60| 72 72 75 70 74 20 74 69 | 6d 65 20 6f 66 74 65 6e |rrupt ti|me often|
|00002d70| 20 72 65 73 75 6c 74 20 | 69 6e 20 64 65 61 64 6c | result |in deadl|
|00002d80| 6f 63 6b 2e 20 28 53 65 | 65 20 d2 44 65 61 64 6c |ock. (Se|e .Deadl|
|00002d90| 6f 63 6b 2e d3 29 20 41 | 6e 20 61 73 79 6e 63 68 |ock..) A|n asynch|
|00002da0| 72 6f 6e 6f 75 73 20 63 | 61 6c 6c 20 63 61 6e 20 |ronous c|all can |
|00002db0| 73 6f 6c 76 65 20 74 68 | 65 20 70 72 6f 62 6c 65 |solve th|e proble|
|00002dc0| 6d 3a 20 69 66 20 74 68 | 65 20 73 65 72 76 69 63 |m: if th|e servic|
|00002dd0| 65 20 79 6f 75 20 63 61 | 6c 6c 20 69 73 20 62 75 |e you ca|ll is bu|
|00002de0| 73 79 20 68 61 6e 64 6c | 69 6e 67 20 61 6e 6f 74 |sy handl|ing anot|
|00002df0| 68 65 72 20 72 65 71 75 | 65 73 74 2c 20 79 6f 75 |her requ|est, you|
|00002e00| 72 20 61 73 79 6e 63 68 | 72 6f 6e 6f 75 73 20 72 |r asynch|ronous r|
|00002e10| 65 71 75 65 73 74 20 69 | 73 20 71 75 65 75 65 64 |equest i|s queued|
|00002e20| 20 61 6e 64 20 79 6f 75 | 72 20 70 72 6f 67 72 61 | and you|r progra|
|00002e30| 6d 20 63 6f 64 65 20 63 | 61 6e 20 67 69 76 65 20 |m code c|an give |
|00002e40| 75 70 20 63 6f 6e 74 72 | 6f 6c 20 28 74 68 61 74 |up contr|ol (that|
|00002e50| 20 69 73 2c 20 74 68 65 | 20 63 6f 6d 70 6c 65 74 | is, the| complet|
|00002e60| 69 6f 6e 20 72 6f 75 74 | 69 6e 65 20 6f 72 20 74 |ion rout|ine or t|
|00002e70| 61 73 6b 20 79 6f 75 72 | 20 63 6f 64 65 20 69 73 |ask your| code is|
|00002e80| 20 70 61 72 74 20 6f 66 | 20 63 61 6e 20 65 6e 64 | part of| can end|
|00002e90| 29 2c 20 6c 65 74 74 69 | 6e 67 20 74 68 65 20 73 |), letti|ng the s|
|00002ea0| 65 72 76 69 63 65 20 63 | 6f 6d 70 6c 65 74 65 20 |ervice c|omplete |
|00002eb0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 72 65 71 75 |the curr|ent requ|
|00002ec0| 65 73 74 20 61 6e 64 20 | 65 76 65 6e 74 75 61 6c |est and |eventual|
|00002ed0| 6c 79 20 70 72 6f 63 65 | 73 73 20 79 6f 75 72 20 |ly proce|ss your |
|00002ee0| 72 65 71 75 65 73 74 2e | 0d 52 6f 75 74 69 6e 65 |request.|.Routine|
|00002ef0| 73 20 63 61 6c 6c 65 64 | 20 73 79 6e 63 68 72 6f |s called| synchro|
|00002f00| 6e 6f 75 73 6c 79 20 61 | 72 65 20 61 6c 6c 6f 77 |nously a|re allow|
|00002f10| 65 64 20 74 6f 20 6d 6f | 76 65 20 6d 65 6d 6f 72 |ed to mo|ve memor|
|00002f20| 79 2c 20 77 68 69 6c 65 | 20 72 6f 75 74 69 6e 65 |y, while| routine|
|00002f30| 73 20 63 61 6c 6c 65 64 | 20 61 73 79 6e 63 68 72 |s called| asynchr|
|00002f40| 6f 6e 6f 75 73 6c 79 20 | 70 75 72 70 6f 73 65 6c |onously |purposel|
|00002f50| 79 20 61 76 6f 69 64 20 | 6d 6f 76 69 6e 67 20 6d |y avoid |moving m|
|00002f60| 65 6d 6f 72 79 20 73 6f | 20 74 68 61 74 20 74 68 |emory so| that th|
|00002f70| 65 79 20 63 61 6e 20 62 | 65 20 63 61 6c 6c 65 64 |ey can b|e called|
|00002f80| 20 61 74 20 69 6e 74 65 | 72 72 75 70 74 20 74 69 | at inte|rrupt ti|
|00002f90| 6d 65 2e 20 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |me. For |example,|
|00002fa0| 20 74 68 65 20 46 69 6c | 65 20 4d 61 6e 61 67 65 | the Fil|e Manage|
|00002fb0| 72 d5 73 20 50 42 48 4f | 70 65 6e 20 72 6f 75 74 |r.s PBHO|pen rout|
|00002fc0| 69 6e 65 20 6d 61 79 20 | 6d 6f 76 65 20 6d 65 6d |ine may |move mem|
|00002fd0| 6f 72 79 20 77 68 65 6e | 20 63 61 6c 6c 65 64 20 |ory when| called |
|00002fe0| 73 79 6e 63 68 72 6f 6e | 6f 75 73 6c 79 2c 20 62 |synchron|ously, b|
|00002ff0| 75 74 20 77 6f 6e d5 74 | 20 77 68 65 6e 20 63 61 |ut won.t| when ca|
|00003000| 6c 6c 65 64 20 61 73 79 | 6e 63 68 72 6f 6e 6f 75 |lled asy|nchronou|
|00003010| 73 6c 79 2e 20 49 66 20 | 79 6f 75 72 20 63 6f 64 |sly. If |your cod|
|00003020| 65 20 69 73 20 65 78 65 | 63 75 74 69 6e 67 20 69 |e is exe|cuting i|
|00003030| 6e 20 61 6e 20 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |n an env|ironment|
|00003040| 20 77 68 65 72 65 20 6d | 65 6d 6f 72 79 20 63 61 | where m|emory ca|
|00003050| 6e d5 74 20 62 65 20 6d | 6f 76 65 64 20 28 66 6f |n.t be m|oved (fo|
|00003060| 72 20 65 78 61 6d 70 6c | 65 2c 20 61 74 20 69 6e |r exampl|e, at in|
|00003070| 74 65 72 72 75 70 74 20 | 74 69 6d 65 29 2c 20 79 |terrupt |time), y|
|00003080| 6f 75 20 6d 75 73 74 20 | 63 61 6c 6c 20 72 6f 75 |ou must |call rou|
|00003090| 74 69 6e 65 73 20 61 73 | 79 6e 63 68 72 6f 6e 6f |tines as|ynchrono|
|000030a0| 75 73 6c 79 20 74 6f 20 | 65 6e 73 75 72 65 20 74 |usly to |ensure t|
|000030b0| 68 61 74 20 74 68 65 79 | 20 64 6f 6e d5 74 20 6d |hat they| don.t m|
|000030c0| 6f 76 65 20 6d 65 6d 6f | 72 79 2e 0d 41 74 20 74 |ove memo|ry..At t|
|000030d0| 68 69 73 20 74 69 6d 65 | 2c 20 74 68 65 20 76 61 |his time|, the va|
|000030e0| 72 69 6f 75 73 20 6c 69 | 73 74 73 20 69 6e 20 49 |rious li|sts in I|
|000030f0| 6e 73 69 64 65 20 4d 61 | 63 69 6e 74 6f 73 68 20 |nside Ma|cintosh |
|00003100| 6f 66 20 d2 52 6f 75 74 | 69 6e 65 73 20 54 68 61 |of .Rout|ines Tha|
|00003110| 74 20 4d 61 79 20 4d 6f | 76 65 20 6f 72 20 50 75 |t May Mo|ve or Pu|
|00003120| 72 67 65 20 4d 65 6d 6f | 72 79 2c d3 20 d2 52 6f |rge Memo|ry,. .Ro|
|00003130| 75 74 69 6e 65 73 20 61 | 6e 64 20 54 68 65 69 72 |utines a|nd Their|
|00003140| 20 4d 65 6d 6f 72 79 20 | 42 65 68 61 76 69 6f 72 | Memory |Behavior|
|00003150| 2c d3 20 61 6e 64 20 d2 | 52 6f 75 74 69 6e 65 73 |,. and .|Routines|
|00003160| 20 54 68 61 74 0d 0d 44 | 45 41 44 4c 4f 43 4b 0d | That..D|EADLOCK.|
|00003170| 42 59 20 47 4f 52 44 4f | 4e 20 53 48 45 52 49 44 |BY GORDO|N SHERID|
|00003180| 41 4e 09 0d 44 65 61 64 | 6c 6f 63 6b 20 69 73 20 |AN..Dead|lock is |
|00003190| 61 20 73 74 61 74 65 20 | 69 6e 20 77 68 69 63 68 |a state |in which|
|000031a0| 20 65 61 63 68 20 6f 66 | 20 74 77 6f 20 6f 72 20 | each of| two or |
|000031b0| 6d 6f 72 65 20 70 72 6f | 63 65 73 73 65 73 20 69 |more pro|cesses i|
|000031c0| 73 20 77 61 69 74 69 6e | 67 20 66 6f 72 20 6f 6e |s waitin|g for on|
|000031d0| 65 20 6f 66 20 74 68 65 | 20 6f 74 68 65 72 20 70 |e of the| other p|
|000031e0| 72 6f 63 65 73 73 65 73 | 20 74 6f 20 72 65 6c 65 |rocesses| to rele|
|000031f0| 61 73 65 20 73 6f 6d 65 | 20 72 65 73 6f 75 72 63 |ase some| resourc|
|00003200| 65 20 6e 65 63 65 73 73 | 61 72 79 20 66 6f 72 20 |e necess|ary for |
|00003210| 69 74 73 20 63 6f 6d 70 | 6c 65 74 69 6f 6e 2e 20 |its comp|letion. |
|00003220| 54 68 65 20 72 65 73 6f | 75 72 63 65 20 6d 61 79 |The reso|urce may|
|00003230| 20 62 65 20 61 20 66 69 | 6c 65 2c 20 61 20 67 6c | be a fi|le, a gl|
|00003240| 6f 62 61 6c 20 76 61 72 | 69 61 62 6c 65 2c 20 6f |obal var|iable, o|
|00003250| 72 20 65 76 65 6e 20 74 | 68 65 20 43 50 55 2e 20 |r even t|he CPU. |
|00003260| 54 68 65 20 70 72 6f 63 | 65 73 73 20 63 6f 75 6c |The proc|ess coul|
|00003270| 64 2c 20 66 6f 72 20 65 | 78 61 6d 70 6c 65 2c 20 |d, for e|xample, |
|00003280| 62 65 20 61 6e 20 61 70 | 70 6c 69 63 61 74 69 6f |be an ap|plicatio|
|00003290| 6e d5 73 20 6d 61 69 6e | 20 65 76 65 6e 74 20 6c |n.s main| event l|
|000032a0| 6f 6f 70 20 6f 72 20 61 | 20 54 69 6d 65 20 4d 61 |oop or a| Time Ma|
|000032b0| 6e 61 67 65 72 20 74 61 | 73 6b 2e 0d 57 68 65 6e |nager ta|sk..When|
|000032c0| 20 64 65 61 64 6c 6f 63 | 6b 20 6f 63 63 75 72 73 | deadloc|k occurs|
|000032d0| 20 6f 6e 20 74 68 65 20 | 4d 61 63 69 6e 74 6f 73 | on the |Macintos|
|000032e0| 68 2c 20 75 73 75 61 6c | 6c 79 20 61 74 20 6c 65 |h, usual|ly at le|
|000032f0| 61 73 74 20 6f 6e 65 20 | 6f 66 20 74 68 65 20 70 |ast one |of the p|
|00003300| 72 6f 63 65 73 73 65 73 | 20 69 73 20 65 78 65 63 |rocesses| is exec|
|00003310| 75 74 69 6e 67 20 61 73 | 20 74 68 65 20 72 65 73 |uting as| the res|
|00003320| 75 6c 74 20 6f 66 20 61 | 6e 20 69 6e 74 65 72 72 |ult of a|n interr|
|00003330| 75 70 74 2e 20 56 42 4c | 20 74 61 73 6b 73 2c 20 |upt. VBL| tasks, |
|00003340| 54 69 6d 65 20 4d 61 6e | 61 67 65 72 20 74 61 73 |Time Man|ager tas|
|00003350| 6b 73 2c 20 44 65 66 65 | 72 72 65 64 20 54 61 73 |ks, Defe|rred Tas|
|00003360| 6b 20 4d 61 6e 61 67 65 | 72 20 74 61 73 6b 73 2c |k Manage|r tasks,|
|00003370| 20 63 6f 6d 70 6c 65 74 | 69 6f 6e 20 72 6f 75 74 | complet|ion rout|
|00003380| 69 6e 65 73 2c 20 61 6e | 64 20 69 6e 74 65 72 72 |ines, an|d interr|
|00003390| 75 70 74 20 68 61 6e 64 | 6c 65 72 73 20 63 61 6e |upt hand|lers can|
|000033a0| 20 61 6c 6c 20 69 6e 74 | 65 72 72 75 70 74 20 61 | all int|errupt a|
|000033b0| 6e 20 61 70 70 6c 69 63 | 61 74 69 6f 6e d5 73 20 |n applic|ation.s |
|000033c0| 6d 61 69 6e 20 74 68 72 | 65 61 64 20 6f 66 20 65 |main thr|ead of e|
|000033d0| 78 65 63 75 74 69 6f 6e | 2e 20 57 68 65 6e 20 74 |xecution|. When t|
|000033e0| 68 65 20 69 6e 74 65 72 | 72 75 70 74 65 64 20 70 |he inter|rupted p|
|000033f0| 72 6f 63 65 73 73 20 69 | 73 20 75 73 69 6e 67 20 |rocess i|s using |
|00003400| 61 20 72 65 73 6f 75 72 | 63 65 20 74 68 61 74 20 |a resour|ce that |
|00003410| 74 68 65 20 69 6e 74 65 | 72 72 75 70 74 69 6e 67 |the inte|rrupting|
|00003420| 20 70 72 6f 63 65 73 73 | 20 6e 65 65 64 73 2c 20 | process| needs, |
|00003430| 74 68 65 20 70 72 6f 63 | 65 73 73 65 73 20 61 72 |the proc|esses ar|
|00003440| 65 20 64 65 61 64 6c 6f | 63 6b 65 64 2e 0d 46 6f |e deadlo|cked..Fo|
|00003450| 72 20 65 78 61 6d 70 6c | 65 2c 20 73 75 70 70 6f |r exampl|e, suppo|
|00003460| 73 65 20 61 20 54 69 6d | 65 20 4d 61 6e 61 67 65 |se a Tim|e Manage|
|00003470| 72 20 74 61 73 6b 20 70 | 65 72 69 6f 64 69 63 61 |r task p|eriodica|
|00003480| 6c 6c 79 20 77 72 69 74 | 65 73 20 64 61 74 61 20 |lly writ|es data |
|00003490| 74 6f 20 61 20 66 69 6c | 65 20 62 79 20 6d 61 6b |to a fil|e by mak|
|000034a0| 69 6e 67 20 61 20 73 79 | 6e 63 68 72 6f 6e 6f 75 |ing a sy|nchronou|
|000034b0| 73 20 57 72 69 74 65 20 | 72 65 71 75 65 73 74 2c |s Write |request,|
|000034c0| 20 61 6e 64 20 61 6e 20 | 61 70 70 6c 69 63 61 74 | and an |applicat|
|000034d0| 69 6f 6e 20 72 65 61 64 | 73 20 74 68 65 20 64 61 |ion read|s the da|
|000034e0| 74 61 20 66 72 6f 6d 20 | 69 74 73 20 6d 61 69 6e |ta from |its main|
|000034f0| 20 65 76 65 6e 74 20 6c | 6f 6f 70 2e 20 44 65 70 | event l|oop. Dep|
|00003500| 65 6e 64 69 6e 67 20 6f | 6e 20 74 68 65 20 66 72 |ending o|n the fr|
|00003510| 65 71 75 65 6e 63 79 20 | 6f 66 20 74 68 65 20 74 |equency |of the t|
|00003520| 61 73 6b 20 61 6e 64 20 | 74 68 65 20 61 63 74 69 |ask and |the acti|
|00003530| 76 69 74 79 20 6c 65 76 | 65 6c 20 6f 66 20 74 68 |vity lev|el of th|
|00003540| 65 20 46 69 6c 65 20 4d | 61 6e 61 67 65 72 2c 20 |e File M|anager, |
|00003550| 74 68 65 20 54 69 6d 65 | 20 4d 61 6e 61 67 65 72 |the Time| Manager|
|00003560| 20 74 61 73 6b 20 6d 61 | 79 20 6f 66 74 65 6e 20 | task ma|y often |
|00003570| 77 72 69 74 65 20 73 75 | 63 63 65 73 73 66 75 6c |write su|ccessful|
|00003580| 6c 79 2e 20 49 6e 65 76 | 69 74 61 62 6c 79 2c 20 |ly. Inev|itably, |
|00003590| 68 6f 77 65 76 65 72 2c | 20 0d 09 74 68 65 20 54 |however,| ..the T|
|000035a0| 69 6d 65 20 4d 61 6e 61 | 67 65 72 20 74 61 73 6b |ime Mana|ger task|
|000035b0| 20 77 69 6c 6c 20 69 6e | 74 65 72 72 75 70 74 20 | will in|terrupt |
|000035c0| 74 68 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e d5 |the appl|ication.|
|000035d0| 73 20 52 65 61 64 20 72 | 65 71 75 65 73 74 20 61 |s Read r|equest a|
|000035e0| 6e 64 20 64 65 61 64 6c | 6f 63 6b 20 77 69 6c 6c |nd deadl|ock will|
|000035f0| 20 6f 63 63 75 72 2e 0d | 42 65 63 61 75 73 65 20 | occur..|Because |
|00003600| 74 68 65 20 46 69 6c 65 | 20 4d 61 6e 61 67 65 72 |the File| Manager|
|00003610| 20 70 72 6f 63 65 73 73 | 65 73 20 6f 6e 6c 79 20 | process|es only |
|00003620| 6f 6e 65 20 72 65 71 75 | 65 73 74 20 61 74 20 61 |one requ|est at a|
|00003630| 20 74 69 6d 65 2c 20 61 | 6e 79 20 73 75 62 73 65 | time, a|ny subse|
|00003640| 71 75 65 6e 74 20 72 65 | 71 75 65 73 74 73 20 6d |quent re|quests m|
|00003650| 75 73 74 20 77 61 69 74 | 20 66 6f 72 20 74 68 65 |ust wait| for the|
|00003660| 20 63 75 72 72 65 6e 74 | 20 72 65 71 75 65 73 74 | current| request|
|00003670| 20 74 6f 20 63 6f 6d 70 | 6c 65 74 65 2e 20 49 6e | to comp|lete. In|
|00003680| 20 74 68 69 73 20 63 61 | 73 65 2c 20 74 68 65 20 | this ca|se, the |
|00003690| 73 79 6e 63 68 72 6f 6e | 6f 75 73 20 72 65 71 75 |synchron|ous requ|
|000036a0| 65 73 74 20 6d 61 64 65 | 20 62 79 20 74 68 65 20 |est made| by the |
|000036b0| 54 69 6d 65 20 4d 61 6e | 61 67 65 72 20 74 61 73 |Time Man|ager tas|
|000036c0| 6b 20 6d 75 73 74 20 77 | 61 69 74 20 66 6f 72 20 |k must w|ait for |
|000036d0| 74 68 65 20 61 70 70 6c | 69 63 61 74 69 6f 6e d5 |the appl|ication.|
|000036e0| 73 20 52 65 61 64 20 72 | 65 71 75 65 73 74 20 74 |s Read r|equest t|
|000036f0| 6f 20 63 6f 6d 70 6c 65 | 74 65 20 62 65 66 6f 72 |o comple|te befor|
|00003700| 65 20 69 74 73 20 57 72 | 69 74 65 20 72 65 71 75 |e its Wr|ite requ|
|00003710| 65 73 74 20 77 69 6c 6c | 20 62 65 20 70 72 6f 63 |est will| be proc|
|00003720| 65 73 73 65 64 2e 20 55 | 6e 66 6f 72 74 75 6e 61 |essed. U|nfortuna|
|00003730| 74 65 6c 79 2c 20 74 68 | 65 20 46 69 6c 65 20 4d |tely, th|e File M|
|00003740| 61 6e 61 67 65 72 20 6d | 75 73 74 20 77 61 69 74 |anager m|ust wait|
|00003750| 20 66 6f 72 20 74 68 65 | 20 54 69 6d 65 20 4d 61 | for the| Time Ma|
|00003760| 6e 61 67 65 72 20 74 61 | 73 6b 20 74 6f 20 63 6f |nager ta|sk to co|
|00003770| 6d 70 6c 65 74 65 20 62 | 65 66 6f 72 65 20 69 74 |mplete b|efore it|
|00003780| 20 63 61 6e 20 72 65 73 | 75 6d 65 20 65 78 65 63 | can res|ume exec|
|00003790| 75 74 69 6f 6e 2e 20 45 | 61 63 68 20 70 72 6f 63 |ution. E|ach proc|
|000037a0| 65 73 73 20 69 73 20 6e | 6f 77 20 77 61 69 74 69 |ess is n|ow waiti|
|000037b0| 6e 67 20 66 6f 72 20 74 | 68 65 20 6f 74 68 65 72 |ng for t|he other|
|000037c0| 20 74 6f 20 63 6f 6d 70 | 6c 65 74 65 2c 20 61 6e | to comp|lete, an|
|000037d0| 64 20 74 68 65 79 d5 6c | 6c 20 63 6f 6e 74 69 6e |d they.l|l contin|
|000037e0| 75 65 20 74 6f 20 77 61 | 69 74 20 66 6f 72 65 76 |ue to wa|it forev|
|000037f0| 65 72 2e 0d 53 79 6e 63 | 68 72 6f 6e 6f 75 73 20 |er..Sync|hronous |
|00003800| 72 65 71 75 65 73 74 73 | 20 61 74 20 69 6e 74 65 |requests| at inte|
|00003810| 72 72 75 70 74 20 74 69 | 6d 65 20 74 65 6e 64 20 |rrupt ti|me tend |
|00003820| 74 6f 20 70 72 6f 64 75 | 63 65 20 64 65 61 64 6c |to produ|ce deadl|
|00003830| 6f 63 6b 2c 20 62 65 63 | 61 75 73 65 20 74 68 65 |ock, bec|ause the|
|00003840| 20 63 61 6c 6c 20 69 73 | 20 71 75 65 75 65 64 20 | call is| queued |
|00003850| 66 6f 72 20 70 72 6f 63 | 65 73 73 69 6e 67 20 61 |for proc|essing a|
|00003860| 6e 64 20 74 68 65 6e 20 | 74 68 65 20 43 50 55 20 |nd then |the CPU |
|00003870| 73 69 74 73 20 61 6e 64 | 20 73 70 69 6e 73 2c 20 |sits and| spins, |
|00003880| 77 61 69 74 69 6e 67 20 | 66 6f 72 20 61 6e 20 69 |waiting |for an i|
|00003890| 6e 74 65 72 72 75 70 74 | 20 74 6f 20 6f 63 63 75 |nterrupt| to occu|
|000038a0| 72 2c 20 77 68 69 63 68 | 20 73 69 67 6e 61 6c 73 |r, which| signals|
|000038b0| 20 74 68 61 74 20 74 68 | 65 20 72 65 71 75 65 73 | that th|e reques|
|000038c0| 74 20 68 61 73 20 62 65 | 65 6e 20 63 6f 6d 70 6c |t has be|en compl|
|000038d0| 65 74 65 64 2e 20 49 66 | 20 69 6e 74 65 72 72 75 |eted. If| interru|
|000038e0| 70 74 73 20 61 72 65 20 | 74 75 72 6e 65 64 20 6f |pts are |turned o|
|000038f0| 66 66 2c 20 6f 72 20 69 | 66 20 61 20 70 72 65 76 |ff, or i|f a prev|
|00003900| 69 6f 75 73 20 70 65 6e | 64 69 6e 67 20 72 65 71 |ious pen|ding req|
|00003910| 75 65 73 74 20 63 61 6e | d5 74 20 66 69 6e 69 73 |uest can|.t finis|
|00003920| 68 20 62 65 63 61 75 73 | 65 20 69 74 d5 73 20 77 |h becaus|e it.s w|
|00003930| 61 69 74 69 6e 67 20 74 | 6f 20 72 65 73 75 6d 65 |aiting t|o resume|
|00003940| 20 65 78 65 63 75 74 69 | 6f 6e 20 61 66 74 65 72 | executi|on after|
|00003950| 20 74 68 65 20 69 6e 74 | 65 72 72 75 70 74 2c 20 | the int|errupt, |
|00003960| 74 68 65 20 43 50 55 20 | 77 69 6c 6c 20 77 61 69 |the CPU |will wai|
|00003970| 74 20 70 61 74 69 65 6e | 74 6c 79 20 28 61 6e 64 |t patien|tly (and|
|00003980| 20 65 74 65 72 6e 61 6c | 6c 79 29 20 66 6f 72 20 | eternal|ly) for |
|00003990| 74 68 65 20 72 65 71 75 | 65 73 74 20 74 6f 20 66 |the requ|est to f|
|000039a0| 69 6e 69 73 68 20 d1 20 | 75 6e 74 69 6c 20 79 6f |inish . |until yo|
|000039b0| 75 20 79 61 6e 6b 20 74 | 68 65 20 70 6f 77 65 72 |u yank t|he power|
|000039c0| 20 63 6f 72 64 20 66 72 | 6f 6d 20 74 68 65 20 77 | cord fr|om the w|
|000039d0| 61 6c 6c 2e 0d 09 0d 53 | 68 6f 75 6c 64 20 4e 6f |all....S|hould No|
|000039e0| 74 20 42 65 20 43 61 6c | 6c 65 64 20 46 72 6f 6d |t Be Cal|led From|
|000039f0| 20 57 69 74 68 69 6e 20 | 61 6e 20 49 6e 74 65 72 | Within |an Inter|
|00003a00| 72 75 70 74 d3 20 61 72 | 65 20 65 69 74 68 65 72 |rupt. ar|e either|
|00003a10| 20 69 6e 63 6f 6d 70 6c | 65 74 65 20 6f 72 20 69 | incompl|ete or i|
|00003a20| 6e 63 6f 72 72 65 63 74 | 20 61 6e 64 20 63 61 6e |ncorrect| and can|
|00003a30| d5 74 20 62 65 20 74 72 | 75 73 74 65 64 20 65 6e |.t be tr|usted en|
|00003a40| 74 69 72 65 6c 79 2e 20 | 54 68 65 20 72 65 61 73 |tirely. |The reas|
|00003a50| 6f 6e 73 20 77 68 79 20 | 61 20 73 79 73 74 65 6d |ons why |a system|
|00003a60| 20 72 6f 75 74 69 6e 65 | 20 63 61 6e d5 74 20 62 | routine| can.t b|
|00003a70| 65 20 63 61 6c 6c 65 64 | 20 61 74 20 69 6e 74 65 |e called| at inte|
|00003a80| 72 72 75 70 74 20 74 69 | 6d 65 20 69 6e 63 6c 75 |rrupt ti|me inclu|
|00003a90| 64 65 3a 20 74 68 65 20 | 72 6f 75 74 69 6e 65 20 |de: the |routine |
|00003aa0| 6d 61 79 20 6d 6f 76 65 | 20 6d 65 6d 6f 72 79 3b |may move| memory;|
|00003ab0| 20 74 68 65 20 72 6f 75 | 74 69 6e 65 20 6d 61 79 | the rou|tine may|
|00003ac0| 20 63 61 75 73 65 20 61 | 20 64 65 61 64 6c 6f 63 | cause a| deadloc|
|00003ad0| 6b 20 63 6f 6e 64 69 74 | 69 6f 6e 3b 20 74 68 65 |k condit|ion; the|
|00003ae0| 20 72 6f 75 74 69 6e 65 | 20 69 73 20 6e 6f 74 20 | routine| is not |
|00003af0| 72 65 65 6e 74 72 61 6e | 74 2e 20 54 68 69 73 20 |reentran|t. This |
|00003b00| 61 72 74 69 63 6c 65 20 | 73 68 6f 77 73 20 68 6f |article |shows ho|
|00003b10| 77 20 74 6f 20 70 6f 73 | 74 70 6f 6e 65 20 6d 6f |w to pos|tpone mo|
|00003b20| 73 74 20 73 79 73 74 65 | 6d 20 63 61 6c 6c 73 20 |st syste|m calls |
|00003b30| 75 6e 74 69 6c 20 61 20 | 73 61 66 65 20 74 69 6d |until a |safe tim|
|00003b40| 65 2e 20 59 6f 75 d5 72 | 65 20 65 6e 63 6f 75 72 |e. You.r|e encour|
|00003b50| 61 67 65 64 20 74 6f 20 | 63 61 6c 6c 20 61 73 20 |aged to |call as |
|00003b60| 66 65 77 20 73 79 73 74 | 65 6d 20 72 6f 75 74 69 |few syst|em routi|
|00003b70| 6e 65 73 20 61 74 20 69 | 6e 74 65 72 72 75 70 74 |nes at i|nterrupt|
|00003b80| 20 74 69 6d 65 20 61 73 | 20 70 6f 73 73 69 62 6c | time as| possibl|
|00003b90| 65 2e 20 0d 54 68 65 20 | 72 6f 75 74 69 6e 65 73 |e. .The |routines|
|00003ba0| 20 64 69 73 63 75 73 73 | 65 64 20 69 6e 20 74 68 | discuss|ed in th|
|00003bb0| 69 73 20 61 72 74 69 63 | 6c 65 20 61 72 65 20 6c |is artic|le are l|
|00003bc0| 6f 77 2d 6c 65 76 65 6c | 20 63 61 6c 6c 73 20 74 |ow-level| calls t|
|00003bd0| 6f 20 74 68 65 20 46 69 | 6c 65 20 4d 61 6e 61 67 |o the Fi|le Manag|
|00003be0| 65 72 2c 20 74 68 65 20 | 44 65 76 69 63 65 20 4d |er, the |Device M|
|00003bf0| 61 6e 61 67 65 72 20 28 | 69 6e 63 6c 75 64 69 6e |anager (|includin|
|00003c00| 67 20 41 70 70 6c 65 54 | 61 6c 6b 20 64 72 69 76 |g AppleT|alk driv|
|00003c10| 65 72 2c 20 53 65 72 69 | 61 6c 20 44 72 69 76 65 |er, Seri|al Drive|
|00003c20| 72 2c 20 61 6e 64 20 64 | 69 73 6b 20 64 72 69 76 |r, and d|isk driv|
|00003c30| 65 72 20 63 61 6c 6c 73 | 29 2c 20 61 6e 64 20 74 |er calls|), and t|
|00003c40| 68 65 20 50 50 43 20 54 | 6f 6f 6c 62 6f 78 2e 20 |he PPC T|oolbox. |
|00003c50| 41 6c 6c 20 74 68 65 73 | 65 20 72 6f 75 74 69 6e |All thes|e routin|
|00003c60| 65 73 20 74 61 6b 65 20 | 74 68 65 20 66 6f 6c 6c |es take |the foll|
|00003c70| 6f 77 69 6e 67 20 66 6f | 72 6d 3a 0d 46 55 4e 43 |owing fo|rm:.FUNC|
|00003c80| 54 49 4f 4e 20 53 6f 6d | 65 46 75 6e 63 74 69 6f |TION Som|eFunctio|
|00003c90| 6e 20 28 70 62 50 74 72 | 3a 20 61 50 61 72 61 6d |n (pbPtr|: aParam|
|00003ca0| 42 6c 6f 63 6b 50 74 72 | 3b 20 61 73 79 6e 63 3a |BlockPtr|; async:|
|00003cb0| 20 42 4f 4f 4c 45 41 4e | 29 3a 20 4f 53 45 72 72 | BOOLEAN|): OSErr|
|00003cc0| 3b 0d 52 6f 75 74 69 6e | 65 73 20 6f 66 20 74 68 |;.Routin|es of th|
|00003cd0| 69 73 20 66 6f 72 6d 20 | 61 72 65 20 65 78 65 63 |is form |are exec|
|00003ce0| 75 74 65 64 20 73 79 6e | 63 68 72 6f 6e 6f 75 73 |uted syn|chronous|
|00003cf0| 6c 79 20 77 68 65 6e 20 | 61 73 79 6e 63 20 3d 20 |ly when |async = |
|00003d00| 46 41 4c 53 45 20 6f 72 | 20 61 73 79 6e 63 68 72 |FALSE or| asynchr|
|00003d10| 6f 6e 6f 75 73 6c 79 20 | 77 68 65 6e 20 61 73 79 |onously |when asy|
|00003d20| 6e 63 20 3d 20 54 52 55 | 45 2e 20 0d 44 65 74 65 |nc = TRU|E. .Dete|
|00003d30| 72 6d 69 6e 69 6e 67 20 | 61 73 79 6e 63 68 72 6f |rmining |asynchro|
|00003d40| 6e 6f 75 73 20 63 61 6c | 6c 20 63 6f 6d 70 6c 65 |nous cal|l comple|
|00003d50| 74 69 6f 6e 0d 59 6f 75 | 72 20 70 72 6f 67 72 61 |tion.You|r progra|
|00003d60| 6d 20 63 61 6e 20 75 73 | 65 20 74 77 6f 20 6d 65 |m can us|e two me|
|00003d70| 74 68 6f 64 73 20 74 6f | 20 64 65 74 65 72 6d 69 |thods to| determi|
|00003d80| 6e 65 20 77 68 65 6e 20 | 61 6e 20 61 73 79 6e 63 |ne when |an async|
|00003d90| 68 72 6f 6e 6f 75 73 20 | 63 61 6c 6c 20 68 61 73 |hronous |call has|
|00003da0| 20 63 6f 6d 70 6c 65 74 | 65 64 3a 20 70 65 72 69 | complet|ed: peri|
|00003db0| 6f 64 69 63 61 6c 6c 79 | 20 70 6f 6c 6c 20 66 6f |odically| poll fo|
|00003dc0| 72 20 63 6f 6d 70 6c 65 | 74 69 6f 6e 20 28 63 68 |r comple|tion (ch|
|00003dd0| 65 63 6b 20 74 68 65 20 | 69 6f 52 65 73 75 6c 74 |eck the |ioResult|
|00003de0| 20 66 69 65 6c 64 20 6f | 66 20 74 68 65 20 70 61 | field o|f the pa|
|00003df0| 72 61 6d 65 74 65 72 20 | 62 6c 6f 63 6b 20 70 61 |rameter |block pa|
|00003e00| 73 73 65 64 20 74 6f 20 | 74 68 65 20 66 75 6e 63 |ssed to |the func|
|00003e10| 74 69 6f 6e 29 20 6f 72 | 20 75 73 65 20 61 20 63 |tion) or| use a c|
|00003e20| 6f 6d 70 6c 65 74 69 6f | 6e 20 72 6f 75 74 69 6e |ompletio|n routin|
|00003e30| 65 2e 20 42 6f 74 68 20 | 6d 65 74 68 6f 64 73 20 |e. Both |methods |
|00003e40| 65 6e 61 62 6c 65 20 79 | 6f 75 72 20 70 72 6f 67 |enable y|our prog|
|00003e50| 72 61 6d 20 74 6f 20 63 | 6f 6e 74 69 6e 75 65 20 |ram to c|ontinue |
|00003e60| 77 69 74 68 20 6f 74 68 | 65 72 20 6f 70 65 72 61 |with oth|er opera|
|00003e70| 74 69 6f 6e 73 20 77 68 | 69 6c 65 20 77 61 69 74 |tions wh|ile wait|
|00003e80| 69 6e 67 20 66 6f 72 20 | 61 6e 20 61 73 79 6e 63 |ing for |an async|
|00003e90| 68 72 6f 6e 6f 75 73 20 | 63 61 6c 6c 20 74 6f 20 |hronous |call to |
|00003ea0| 63 6f 6d 70 6c 65 74 65 | 2e 0d 50 6f 6c 6c 69 6e |complete|..Pollin|
|00003eb0| 67 20 66 6f 72 20 63 6f | 6d 70 6c 65 74 69 6f 6e |g for co|mpletion|
|00003ec0| 0d 50 6f 6c 6c 69 6e 67 | 20 66 6f 72 20 63 6f 6d |.Polling| for com|
|00003ed0| 70 6c 65 74 69 6f 6e 20 | 69 73 20 61 20 73 69 6d |pletion |is a sim|
|00003ee0| 70 6c 65 20 6d 65 74 68 | 6f 64 20 74 6f 20 75 73 |ple meth|od to us|
|00003ef0| 65 20 77 68 65 6e 20 79 | 6f 75 20 68 61 76 65 20 |e when y|ou have |
|00003f00| 6f 6e 6c 79 20 6f 6e 65 | 20 6f 72 20 74 77 6f 20 |only one| or two |
|00003f10| 61 73 79 6e 63 68 72 6f | 6e 6f 75 73 20 63 61 6c |asynchro|nous cal|
|00003f20| 6c 73 20 6f 75 74 73 74 | 61 6e 64 69 6e 67 20 61 |ls outst|anding a|
|00003f30| 74 20 61 20 74 69 6d 65 | 2e 20 49 74 d5 73 20 6c |t a time|. It.s l|
|00003f40| 69 6b 65 20 67 69 76 69 | 6e 67 20 73 6f 6d 65 6f |ike givi|ng someo|
|00003f50| 6e 65 20 61 20 74 61 73 | 6b 20 61 6e 64 20 63 61 |ne a tas|k and ca|
|00003f60| 6c 6c 69 6e 67 20 74 68 | 65 6d 20 70 65 72 69 6f |lling th|em perio|
|00003f70| 64 69 63 61 6c 6c 79 20 | 74 6f 20 73 65 65 20 69 |dically |to see i|
|00003f80| 66 20 74 68 65 79 d5 76 | 65 20 63 6f 6d 70 6c 65 |f they.v|e comple|
|00003f90| 74 65 64 20 69 74 2e 20 | 57 68 65 6e 20 79 6f 75 |ted it. |When you|
|00003fa0| 72 20 70 72 6f 67 72 61 | 6d 20 66 69 6c 6c 73 20 |r progra|m fills |
|00003fb0| 69 6e 20 74 68 65 20 70 | 61 72 61 6d 65 74 65 72 |in the p|arameter|
|00003fc0| 20 62 6c 6f 63 6b 20 74 | 6f 20 70 61 73 73 20 74 | block t|o pass t|
|00003fd0| 6f 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 2c 20 |o the fu|nction, |
|00003fe0| 69 74 20 73 65 74 73 20 | 74 68 65 20 69 6f 43 6f |it sets |the ioCo|
|00003ff0| 6d 70 6c 65 74 69 6f 6e | 20 66 69 65 6c 64 20 74 |mpletion| field t|
|00004000| 6f 20 4e 49 4c 2c 20 69 | 6e 64 69 63 61 74 69 6e |o NIL, i|ndicatin|
|00004010| 67 20 74 68 61 74 20 74 | 68 65 72 65 d5 73 20 6e |g that t|here.s n|
|00004020| 6f 20 63 6f 6d 70 6c 65 | 74 69 6f 6e 20 72 6f 75 |o comple|tion rou|
|00004030| 74 69 6e 65 2e 20 54 68 | 65 6e 2c 20 61 66 74 65 |tine. Th|en, afte|
|00004040| 72 20 63 61 6c 6c 69 6e | 67 20 74 68 65 20 66 75 |r callin|g the fu|
|00004050| 6e 63 74 69 6f 6e 20 61 | 73 79 6e 63 68 72 6f 6e |nction a|synchron|
|00004060| 6f 75 73 6c 79 2c 20 79 | 6f 75 72 20 70 72 6f 67 |ously, y|our prog|
|00004070| 72 61 6d 20 6f 6e 6c 79 | 20 6e 65 65 64 73 20 74 |ram only| needs t|
|00004080| 6f 20 70 6f 6c 6c 20 74 | 68 65 20 76 61 6c 75 65 |o poll t|he value|
|00004090| 20 6f 66 20 74 68 65 20 | 69 6f 52 65 73 75 6c 74 | of the |ioResult|
|000040a0| 20 66 69 65 6c 64 20 6f | 66 20 74 68 65 20 70 61 | field o|f the pa|
|000040b0| 72 61 6d 65 74 65 72 20 | 62 6c 6f 63 6b 20 70 61 |rameter |block pa|
|000040c0| 73 73 65 64 20 74 6f 20 | 74 68 65 20 66 75 6e 63 |ssed to |the func|
|000040d0| 74 69 6f 6e 20 61 6e 64 | 20 77 61 69 74 20 66 6f |tion and| wait fo|
|000040e0| 72 20 69 74 20 74 6f 20 | 63 68 61 6e 67 65 3a 20 |r it to |change: |
|000040f0| 0d a5 09 41 20 70 6f 73 | 69 74 69 76 65 20 76 61 |...A pos|itive va|
|00004100| 6c 75 65 20 69 6e 64 69 | 63 61 74 65 73 20 74 68 |lue indi|cates th|
|00004110| 65 20 63 61 6c 6c 20 69 | 73 20 65 69 74 68 65 72 |e call i|s either|
|00004120| 20 73 74 69 6c 6c 20 71 | 75 65 75 65 64 20 6f 72 | still q|ueued or|
|00004130| 20 69 6e 20 74 68 65 20 | 70 72 6f 63 65 73 73 20 | in the |process |
|00004140| 6f 66 20 65 78 65 63 75 | 74 69 6e 67 2e 0d a5 09 |of execu|ting....|
|00004150| 41 20 76 61 6c 75 65 20 | 6c 65 73 73 20 74 68 61 |A value |less tha|
|00004160| 6e 20 6f 72 20 65 71 75 | 61 6c 20 74 6f 20 30 20 |n or equ|al to 0 |
|00004170| 28 6e 6f 45 72 72 29 20 | 69 6e 64 69 63 61 74 65 |(noErr) |indicate|
|00004180| 73 20 74 68 65 20 63 61 | 6c 6c 20 68 61 73 20 63 |s the ca|ll has c|
|00004190| 6f 6d 70 6c 65 74 65 64 | 20 28 65 69 74 68 65 72 |ompleted| (either|
|000041a0| 20 77 69 74 68 20 6f 72 | 20 77 69 74 68 6f 75 74 | with or| without|
|000041b0| 20 61 6e 20 65 72 72 6f | 72 20 63 6f 6e 64 69 74 | an erro|r condit|
|000041c0| 69 6f 6e 29 2e 0d 50 6f | 6c 6c 69 6e 67 20 69 73 |ion)..Po|lling is|
|000041d0| 20 75 73 75 61 6c 6c 79 | 20 73 74 72 61 69 67 68 | usually| straigh|
|000041e0| 74 66 6f 72 77 61 72 64 | 20 61 6e 64 20 73 69 6d |tforward| and sim|
|000041f0| 70 6c 65 20 74 6f 20 69 | 6d 70 6c 65 6d 65 6e 74 |ple to i|mplement|
|00004200| 2c 20 77 68 69 63 68 20 | 6d 61 6b 65 73 20 74 68 |, which |makes th|
|00004210| 65 20 63 6f 64 65 20 75 | 73 65 64 20 74 6f 20 69 |e code u|sed to i|
|00004220| 6d 70 6c 65 6d 65 6e 74 | 20 70 6f 6c 6c 69 6e 67 |mplement| polling|
|00004230| 20 65 61 73 79 20 74 6f | 20 64 65 62 75 67 2e 20 | easy to| debug. |
|00004240| 54 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 63 6f |The foll|owing co|
|00004250| 64 65 20 73 68 6f 77 73 | 20 61 6e 20 61 73 79 6e |de shows| an asyn|
|00004260| 63 68 72 6f 6e 6f 75 73 | 20 50 50 43 49 6e 66 6f |chronous| PPCInfo|
|00004270| 72 6d 20 63 61 6c 6c 20 | 61 6e 64 20 68 6f 77 20 |rm call |and how |
|00004280| 74 6f 20 70 6f 6c 6c 20 | 66 6f 72 20 69 74 73 20 |to poll |for its |
|00004290| 63 6f 6d 70 6c 65 74 69 | 6f 6e 3a 0d 50 52 4f 43 |completi|on:.PROC|
|000042a0| 45 44 55 52 45 20 4d 79 | 50 50 43 49 6e 66 6f 72 |EDURE My|PPCInfor|
|000042b0| 6d 3b 0d 09 56 41 52 0d | 09 09 65 72 72 3a 20 4f |m;..VAR.|..err: O|
|000042c0| 53 45 72 72 3b 09 7b 20 | 45 72 72 6f 72 20 63 6f |SErr;.{ |Error co|
|000042d0| 6e 64 69 74 69 6f 6e 73 | 20 61 72 65 20 69 67 6e |nditions| are ign|
|000042e0| 6f 72 65 64 20 69 6e 20 | 74 68 69 73 20 70 72 6f |ored in |this pro|
|000042f0| 63 65 64 75 72 65 20 7d | 0d 09 09 09 09 09 09 09 |cedure }|........|
|00004300| 7b 20 62 65 63 61 75 73 | 65 20 74 68 65 79 20 61 |{ becaus|e they a|
|00004310| 72 65 20 63 61 75 67 68 | 74 20 69 6e 20 50 6f 6c |re caugh|t in Pol|
|00004320| 6c 46 6f 72 43 6f 6d 70 | 6c 65 74 69 6f 6e 2e 20 |lForComp|letion. |
|00004330| 7d 0d 42 45 47 49 4e 0d | 09 67 50 50 43 50 61 72 |}.BEGIN.|.gPPCPar|
|00004340| 61 6d 42 6c 6f 63 6b 2e | 69 6e 66 6f 72 6d 50 61 |amBlock.|informPa|
|00004350| 72 61 6d 2e 69 6f 43 6f | 6d 70 6c 65 74 69 6f 6e |ram.ioCo|mpletion|
|00004360| 20 3a 3d 20 4e 49 4c 3b | 0d 09 67 50 50 43 50 61 | := NIL;|..gPPCPa|
|00004370| 72 61 6d 42 6c 6f 63 6b | 2e 69 6e 66 6f 72 6d 50 |ramBlock|.informP|
|00004380| 61 72 61 6d 2e 70 6f 72 | 74 52 65 66 4e 75 6d 20 |aram.por|tRefNum |
|00004390| 3a 3d 20 67 50 6f 72 74 | 52 65 66 4e 75 6d 3b 0d |:= gPort|RefNum;.|
|000043a0| 09 67 50 50 43 50 61 72 | 61 6d 42 6c 6f 63 6b 2e |.gPPCPar|amBlock.|
|000043b0| 69 6e 66 6f 72 6d 50 61 | 72 61 6d 2e 61 75 74 6f |informPa|ram.auto|
|000043c0| 41 63 63 65 70 74 20 3a | 3d 20 54 52 55 45 3b 0d |Accept :|= TRUE;.|
|000043d0| 09 67 50 50 43 50 61 72 | 61 6d 42 6c 6f 63 6b 2e |.gPPCPar|amBlock.|
|000043e0| 69 6e 66 6f 72 6d 50 61 | 72 61 6d 2e 70 6f 72 74 |informPa|ram.port|
|000043f0| 4e 61 6d 65 20 3a 3d 20 | 40 67 50 50 43 50 6f 72 |Name := |@gPPCPor|
|00004400| 74 3b 0d 09 67 50 50 43 | 50 61 72 61 6d 42 6c 6f |t;..gPPC|ParamBlo|
|00004410| 63 6b 2e 69 6e 66 6f 72 | 6d 50 61 72 61 6d 2e 6c |ck.infor|mParam.l|
|00004420| 6f 63 61 74 69 6f 6e 4e | 61 6d 65 20 3a 3d 20 40 |ocationN|ame := @|
|00004430| 67 4c 6f 63 61 74 69 6f | 6e 4e 61 6d 65 3b 0d 09 |gLocatio|nName;..|
|00004440| 67 50 50 43 50 61 72 61 | 6d 42 6c 6f 63 6b 2e 69 |gPPCPara|mBlock.i|
|00004450| 6e 66 6f 72 6d 50 61 72 | 61 6d 2e 75 73 65 72 4e |nformPar|am.userN|
|00004460| 61 6d 65 20 3a 3d 20 40 | 67 55 73 65 72 4e 61 6d |ame := @|gUserNam|
|00004470| 65 3b 0d 09 65 72 72 20 | 3a 3d 20 50 50 43 49 6e |e;..err |:= PPCIn|
|00004480| 66 6f 72 6d 28 50 50 43 | 49 6e 66 6f 72 6d 50 42 |form(PPC|InformPB|
|00004490| 50 74 72 28 40 67 50 50 | 43 50 61 72 61 6d 42 6c |Ptr(@gPP|CParamBl|
|000044a0| 6f 63 6b 29 2c 20 54 52 | 55 45 29 3b 0d 45 4e 44 |ock), TR|UE);.END|
|000044b0| 3b 0d 49 6e 20 74 68 69 | 73 20 63 6f 64 65 2c 20 |;.In thi|s code, |
|000044c0| 4d 79 50 50 43 49 6e 66 | 6f 72 6d 20 63 61 6c 6c |MyPPCInf|orm call|
|000044d0| 73 20 74 68 65 20 50 50 | 43 49 6e 66 6f 72 6d 20 |s the PP|CInform |
|000044e0| 66 75 6e 63 74 69 6f 6e | 20 61 73 79 6e 63 68 72 |function| asynchr|
|000044f0| 6f 6e 6f 75 73 6c 79 20 | 77 69 74 68 20 6e 6f 20 |onously |with no |
|00004500| 63 6f 6d 70 6c 65 74 69 | 6f 6e 20 72 6f 75 74 69 |completi|on routi|
|00004510| 6e 65 20 28 69 6f 43 6f | 6d 70 6c 65 74 69 6f 6e |ne (ioCo|mpletion|
|00004520| 20 69 73 20 4e 49 4c 29 | 2e 20 54 68 65 20 70 72 | is NIL)|. The pr|
|00004530| 6f 67 72 61 6d 20 63 61 | 6e 20 74 68 65 6e 20 63 |ogram ca|n then c|
|00004540| 6f 6e 74 69 6e 75 65 20 | 74 6f 20 64 6f 20 6f 74 |ontinue |to do ot|
|00004550| 68 65 72 20 74 68 69 6e | 67 73 20 77 68 69 6c 65 |her thin|gs while|
|00004560| 20 70 65 72 69 6f 64 69 | 63 61 6c 6c 79 20 63 61 | periodi|cally ca|
|00004570| 6c 6c 69 6e 67 20 74 68 | 65 20 50 6f 6c 6c 46 6f |lling th|e PollFo|
|00004580| 72 43 6f 6d 70 6c 65 74 | 69 6f 6e 20 70 72 6f 63 |rComplet|ion proc|
|00004590| 65 64 75 72 65 20 74 6f | 20 66 69 6e 64 20 6f 75 |edure to| find ou|
|000045a0| 74 20 77 68 65 6e 20 74 | 68 65 20 61 73 79 6e 63 |t when t|he async|
|000045b0| 68 72 6f 6e 6f 75 73 20 | 63 61 6c 6c 20 63 6f 6d |hronous |call com|
|000045c0| 70 6c 65 74 65 73 2e 0d | 0d 50 52 4f 43 45 44 55 |pletes..|.PROCEDU|
|000045d0| 52 45 20 50 6f 6c 6c 46 | 6f 72 43 6f 6d 70 6c 65 |RE PollF|orComple|
|000045e0| 74 69 6f 6e 3b 0d 42 45 | 47 49 4e 0d 09 49 46 20 |tion;.BE|GIN..IF |
|000045f0| 67 50 50 43 50 61 72 61 | 6d 42 6c 6f 63 6b 2e 69 |gPPCPara|mBlock.i|
|00004600| 6e 66 6f 72 6d 50 61 72 | 61 6d 2e 69 6f 52 65 73 |nformPar|am.ioRes|
|00004610| 75 6c 74 20 3c 3d 20 6e | 6f 45 72 72 20 54 48 45 |ult <= n|oErr THE|
|00004620| 4e 0d 09 09 42 45 47 49 | 4e 09 7b 20 54 68 65 20 |N...BEGI|N.{ The |
|00004630| 63 61 6c 6c 20 68 61 73 | 20 63 6f 6d 70 6c 65 74 |call has| complet|
|00004640| 65 64 2e 20 7d 0d 09 09 | 09 49 46 20 67 50 50 43 |ed. }...|.IF gPPC|
|00004650| 50 61 72 61 6d 42 6c 6f | 63 6b 2e 69 6e 66 6f 72 |ParamBlo|ck.infor|
|00004660| 6d 50 61 72 61 6d 2e 69 | 6f 52 65 73 75 6c 74 20 |mParam.i|oResult |
|00004670| 3d 20 6e 6f 45 72 72 20 | 54 48 45 4e 0d 09 09 09 |= noErr |THEN....|
|00004680| 09 42 45 47 49 4e 0d 09 | 09 09 09 09 7b 20 54 68 |.BEGIN..|....{ Th|
|00004690| 65 20 63 61 6c 6c 20 63 | 6f 6d 70 6c 65 74 65 64 |e call c|ompleted|
|000046a0| 20 73 75 63 63 65 73 73 | 66 75 6c 6c 79 2e 20 7d | success|fully. }|
|000046b0| 0d 09 09 09 09 45 4e 44 | 0d 09 09 09 45 4c 53 45 |.....END|....ELSE|
|000046c0| 0d 09 09 09 09 42 45 47 | 49 4e 0d 09 09 09 09 09 |.....BEG|IN......|
|000046d0| 7b 20 54 68 65 20 63 61 | 6c 6c 20 66 61 69 6c 65 |{ The ca|ll faile|
|000046e0| 64 2c 20 68 61 6e 64 6c | 65 20 74 68 65 20 65 72 |d, handl|e the er|
|000046f0| 72 6f 72 2e 20 7d 0d 09 | 09 09 09 45 4e 44 3b 0d |ror. }..|...END;.|
|00004700| 09 09 45 4e 44 3b 0d 45 | 4e 44 3b 0d 50 6f 6c 6c |..END;.E|ND;.Poll|
|00004710| 46 6f 72 43 6f 6d 70 6c | 65 74 69 6f 6e 20 63 68 |ForCompl|etion ch|
|00004720| 65 63 6b 73 20 74 68 65 | 20 76 61 6c 75 65 20 6f |ecks the| value o|
|00004730| 66 20 74 68 65 20 69 6f | 52 65 73 75 6c 74 20 66 |f the io|Result f|
|00004740| 69 65 6c 64 20 74 6f 20 | 66 69 6e 64 20 6f 75 74 |ield to |find out|
|00004750| 20 77 68 65 74 68 65 72 | 20 50 50 43 49 6e 66 6f | whether| PPCInfo|
|00004760| 72 6d 20 68 61 73 20 63 | 6f 6d 70 6c 65 74 65 64 |rm has c|ompleted|
|00004770| 2e 20 49 66 20 74 68 65 | 20 63 61 6c 6c 20 68 61 |. If the| call ha|
|00004780| 73 20 63 6f 6d 70 6c 65 | 74 65 64 2c 20 50 6f 6c |s comple|ted, Pol|
|00004790| 6c 46 6f 72 43 6f 6d 70 | 6c 65 74 69 6f 6e 20 63 |lForComp|letion c|
|000047a0| 68 65 63 6b 73 20 66 6f | 72 20 61 6e 20 61 72 72 |hecks fo|r an arr|
|000047b0| 6f 72 20 63 6f 6e 64 69 | 74 69 6f 6e 20 61 6e 64 |or condi|tion and|
|000047c0| 20 74 68 65 6e 20 70 65 | 72 66 6f 72 6d 73 20 61 | then pe|rforms a|
|000047d0| 6e 20 61 70 70 72 6f 70 | 72 69 61 74 65 20 61 63 |n approp|riate ac|
|000047e0| 74 69 6f 6e 2e 0d 54 68 | 65 72 65 20 61 72 65 20 |tion..Th|ere are |
|000047f0| 74 68 72 65 65 20 69 6d | 70 6f 72 74 61 6e 74 20 |three im|portant |
|00004800| 74 68 69 6e 67 73 20 74 | 6f 20 6e 6f 74 65 20 69 |things t|o note i|
|00004810| 6e 20 74 68 69 73 20 65 | 78 61 6d 70 6c 65 20 6f |n this e|xample o|
|00004820| 66 20 70 6f 6c 6c 69 6e | 67 20 66 6f 72 20 63 6f |f pollin|g for co|
|00004830| 6d 70 6c 65 74 69 6f 6e | 3a 20 0d a5 09 54 68 65 |mpletion|: ...The|
|00004840| 20 70 61 72 61 6d 65 74 | 65 72 20 62 6c 6f 63 6b | paramet|er block|
|00004850| 20 70 61 73 73 65 64 20 | 74 6f 20 50 50 43 49 6e | passed |to PPCIn|
|00004860| 66 6f 72 6d 2c 20 67 50 | 50 43 50 61 72 61 6d 42 |form, gP|PCParamB|
|00004870| 6c 6f 63 6b 2c 20 69 73 | 20 61 20 70 72 6f 67 72 |lock, is| a progr|
|00004880| 61 6d 20 67 6c 6f 62 61 | 6c 20 76 61 72 69 61 62 |am globa|l variab|
|00004890| 6c 65 2e 20 53 69 6e 63 | 65 20 74 68 65 20 70 61 |le. Sinc|e the pa|
|000048a0| 72 61 6d 65 74 65 72 20 | 62 6c 6f 63 6b 20 70 61 |rameter |block pa|
|000048b0| 73 73 65 64 20 74 6f 20 | 61 6e 20 61 73 79 6e 63 |ssed to |an async|
|000048c0| 68 72 6f 6e 6f 75 73 20 | 63 61 6c 6c 20 69 73 20 |hronous |call is |
|000048d0| 6f 77 6e 65 64 20 62 79 | 20 74 68 65 20 73 79 73 |owned by| the sys|
|000048e0| 74 65 6d 20 75 6e 74 69 | 6c 20 74 68 65 20 63 61 |tem unti|l the ca|
|000048f0| 6c 6c 20 63 6f 6d 70 6c | 65 74 65 73 2c 20 74 68 |ll compl|etes, th|
|00004900| 65 20 70 61 72 61 6d 65 | 74 65 72 20 62 6c 6f 63 |e parame|ter bloc|
|00004910| 6b 20 6d 75 73 74 20 6e | 6f 74 20 62 65 20 64 65 |k must n|ot be de|
|00004920| 63 6c 61 72 65 64 20 61 | 73 20 61 20 6c 6f 63 61 |clared a|s a loca|
|00004930| 6c 20 76 61 72 69 61 62 | 6c 65 20 77 69 74 68 69 |l variab|le withi|
|00004940| 6e 20 74 68 65 20 72 6f | 75 74 69 6e 65 20 74 68 |n the ro|utine th|
|00004950| 61 74 20 6d 61 6b 65 73 | 20 74 68 65 20 61 73 79 |at makes| the asy|
|00004960| 6e 63 68 72 6f 6e 6f 75 | 73 20 63 61 6c 6c 2e 20 |nchronou|s call. |
|00004970| 54 68 65 20 6d 65 6d 6f | 72 79 20 75 73 65 64 20 |The memo|ry used |
|00004980| 62 79 20 6c 6f 63 61 6c | 20 76 61 72 69 61 62 6c |by local| variabl|
|00004990| 65 73 20 69 73 20 72 65 | 6c 65 61 73 65 64 20 74 |es is re|leased t|
|000049a0| 6f 20 74 68 65 20 73 74 | 61 63 6b 20 77 68 65 6e |o the st|ack when|
|000049b0| 20 61 20 72 6f 75 74 69 | 6e 65 20 65 6e 64 73 2c | a routi|ne ends,|
|000049c0| 20 61 6e 64 20 69 66 20 | 74 68 61 74 20 70 61 72 | and if |that par|
|000049d0| 74 20 6f 66 20 74 68 65 | 20 73 74 61 63 6b 20 67 |t of the| stack g|
|000049e0| 65 74 73 20 72 65 75 73 | 65 64 2c 20 74 68 65 20 |ets reus|ed, the |
|000049f0| 70 61 72 61 6d 65 74 65 | 72 20 62 6c 6f 63 6b 2c |paramete|r block,|
|00004a00| 20 77 68 69 63 68 20 63 | 6f 75 6c 64 20 73 74 69 | which c|ould sti|
|00004a10| 6c 6c 20 62 65 20 70 61 | 72 74 20 6f 66 20 61 6e |ll be pa|rt of an|
|00004a20| 20 6f 70 65 72 61 74 69 | 6e 67 20 73 79 73 74 65 | operati|ng syste|
|00004a30| 6d 20 71 75 65 75 65 2c | 20 63 61 6e 20 67 65 74 |m queue,| can get|
|00004a40| 20 74 72 61 73 68 65 64 | 2c 20 63 61 75 73 69 6e | trashed|, causin|
|00004a50| 67 20 65 69 74 68 65 72 | 20 75 6e 65 78 70 65 63 |g either| unexpec|
|00004a60| 74 65 64 20 72 65 73 75 | 6c 74 73 20 6f 72 20 61 |ted resu|lts or a|
|00004a70| 20 73 79 73 74 65 6d 20 | 63 72 61 73 68 2e 20 41 | system |crash. A|
|00004a80| 6c 77 61 79 73 20 64 65 | 63 6c 61 72 65 20 70 61 |lways de|clare pa|
|00004a90| 72 61 6d 65 74 65 72 20 | 62 6c 6f 63 6b 73 20 67 |rameter |blocks g|
|00004aa0| 6c 6f 62 61 6c 6c 79 20 | 6f 72 20 61 73 20 6e 6f |lobally |or as no|
|00004ab0| 6e 72 65 6c 6f 63 61 74 | 61 62 6c 65 20 6f 62 6a |nrelocat|able obj|
|00004ac0| 65 63 74 73 20 69 6e 20 | 74 68 65 20 68 65 61 70 |ects in |the heap|
|00004ad0| 2e 0d a5 09 43 61 6c 6c | 73 20 74 6f 20 50 6f 6c |....Call|s to Pol|
|00004ae0| 6c 46 6f 72 43 6f 6d 70 | 6c 65 74 69 6f 6e 20 6d |lForComp|letion m|
|00004af0| 75 73 74 20 62 65 20 6d | 61 64 65 20 66 72 6f 6d |ust be m|ade from|
|00004b00| 20 61 20 70 72 6f 67 72 | 61 6d 20 6c 6f 6f 70 20 | a progr|am loop |
|00004b10| 74 68 61 74 d5 73 20 6e | 6f 74 20 65 78 65 63 75 |that.s n|ot execu|
|00004b20| 74 65 64 20 63 6f 6d 70 | 6c 65 74 65 6c 79 20 61 |ted comp|letely a|
|00004b30| 74 20 69 6e 74 65 72 72 | 75 70 74 20 74 69 6d 65 |t interr|upt time|
|00004b40| 2e 20 54 68 69 73 20 70 | 72 65 76 65 6e 74 73 20 |. This p|revents |
|00004b50| 64 65 61 64 6c 6f 63 6b | 2e 20 59 6f 75 20 64 6f |deadlock|. You do|
|00004b60| 6e d5 74 20 6e 65 63 65 | 73 73 61 72 69 6c 79 20 |n.t nece|ssarily |
|00004b70| 68 61 76 65 20 74 6f 20 | 70 6f 6c 6c 20 66 72 6f |have to |poll fro|
|00004b80| 6d 20 61 6e 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |m an app|lication|
|00004b90| d5 73 20 65 76 65 6e 74 | 20 6c 6f 6f 70 20 28 77 |.s event| loop (w|
|00004ba0| 68 69 63 68 20 69 73 20 | 65 78 65 63 75 74 65 64 |hich is |executed|
|00004bb0| 20 61 74 20 6e 6f 6e 69 | 6e 74 65 72 72 75 70 74 | at noni|nterrupt|
|00004bc0| 20 74 69 6d 65 29 2c 20 | 62 75 74 20 69 66 20 79 | time), |but if y|
|00004bd0| 6f 75 20 70 6f 6c 6c 20 | 66 72 6f 6d 20 63 6f 64 |ou poll |from cod|
|00004be0| 65 20 74 68 61 74 20 65 | 78 65 63 75 74 65 73 20 |e that e|xecutes |
|00004bf0| 61 74 20 69 6e 74 65 72 | 72 75 70 74 20 74 69 6d |at inter|rupt tim|
|00004c00| 65 2c 20 74 68 61 74 20 | 63 6f 64 65 20 6d 75 73 |e, that |code mus|
|00004c10| 74 20 67 69 76 65 20 75 | 70 20 63 6f 6e 74 72 6f |t give u|p contro|
|00004c20| 6c 20 62 65 74 77 65 65 | 6e 20 70 6f 6c 6c 73 2e |l betwee|n polls.|
|00004c30| 0d a5 09 50 6f 6c 6c 46 | 6f 72 43 6f 6d 70 6c 65 |...PollF|orComple|
|00004c40| 74 69 6f 6e 20 63 68 65 | 63 6b 73 20 74 68 65 20 |tion che|cks the |
|00004c50| 69 6f 52 65 73 75 6c 74 | 20 66 69 65 6c 64 20 6f |ioResult| field o|
|00004c60| 66 20 74 68 65 20 70 61 | 72 61 6d 65 74 65 72 20 |f the pa|rameter |
|00004c70| 62 6c 6f 63 6b 20 74 6f | 20 64 65 74 65 72 6d 69 |block to| determi|
|00004c80| 6e 65 20 77 68 65 74 68 | 65 72 20 50 50 43 49 6e |ne wheth|er PPCIn|
|00004c90| 66 6f 72 6d 20 63 6f 6d | 70 6c 65 74 65 64 20 61 |form com|pleted a|
|00004ca0| 6e 64 2c 20 69 66 20 69 | 74 20 63 6f 6d 70 6c 65 |nd, if i|t comple|
|00004cb0| 74 65 64 2c 20 74 6f 20 | 73 65 65 20 69 66 20 69 |ted, to |see if i|
|00004cc0| 74 20 63 6f 6d 70 6c 65 | 74 65 64 20 73 75 63 63 |t comple|ted succ|
|00004cd0| 65 73 73 66 75 6c 6c 79 | 2e 0d 4f 6e 65 20 64 72 |essfully|..One dr|
|00004ce0| 61 77 62 61 63 6b 20 74 | 6f 20 70 6f 6c 6c 69 6e |awback t|o pollin|
|00004cf0| 67 20 66 6f 72 20 63 6f | 6d 70 6c 65 74 69 6f 6e |g for co|mpletion|
|00004d00| 20 69 73 20 6c 61 74 65 | 6e 63 79 2e 20 57 68 65 | is late|ncy. Whe|
|00004d10| 6e 20 74 68 65 20 61 73 | 79 6e 63 68 72 6f 6e 6f |n the as|ynchrono|
|00004d20| 75 73 20 72 6f 75 74 69 | 6e 65 20 63 6f 6d 70 6c |us routi|ne compl|
|00004d30| 65 74 65 73 20 69 74 73 | 20 6a 6f 62 2c 20 79 6f |etes its| job, yo|
|00004d40| 75 72 20 70 72 6f 67 72 | 61 6d 20 77 6f 6e d5 74 |ur progr|am won.t|
|00004d50| 20 6b 6e 6f 77 20 69 74 | 20 75 6e 74 69 6c 20 74 | know it| until t|
|00004d60| 68 65 20 6e 65 78 74 20 | 74 69 6d 65 20 79 6f 75 |he next |time you|
|00004d70| 20 70 6f 6c 6c 2e 20 54 | 68 69 73 20 63 61 6e 20 | poll. T|his can |
|00004d80| 62 65 20 77 61 73 74 65 | 64 20 74 69 6d 65 2e 20 |be waste|d time. |
|00004d90| 46 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 61 73 73 |For exam|ple, ass|
|00004da0| 75 6d 65 20 79 6f 75 20 | 67 69 76 65 20 73 6f 6d |ume you |give som|
|00004db0| 65 6f 6e 65 20 61 20 74 | 61 73 6b 20 61 6e 64 20 |eone a t|ask and |
|00004dc0| 61 73 6b 20 74 68 65 6d | 20 69 66 20 74 68 65 79 |ask them| if they|
|00004dd0| d5 72 65 20 64 6f 6e 65 | 20 28 70 6f 6c 6c 29 20 |.re done| (poll) |
|00004de0| 6f 6e 6c 79 20 6f 6e 63 | 65 20 61 20 64 61 79 3a |only onc|e a day:|
|00004df0| 20 69 66 20 74 68 65 79 | 20 66 69 6e 69 73 68 20 | if they| finish |
|00004e00| 74 68 65 20 74 61 73 6b | 20 61 66 74 65 72 20 61 |the task| after a|
|00004e10| 6e 20 68 6f 75 72 2c 20 | 79 6f 75 20 77 6f 6e d5 |n hour, |you won.|
|00004e20| 74 0d 0d 0d 46 55 4e 43 | 54 49 4f 4e 20 52 45 53 |t...FUNC|TION RES|
|00004e30| 55 4c 54 53 20 41 4e 44 | 20 46 55 4e 43 54 49 4f |ULTS AND| FUNCTIO|
|00004e40| 4e 20 43 4f 4d 50 4c 45 | 54 49 4f 4e 20 0d 42 59 |N COMPLE|TION .BY|
|00004e50| 20 53 43 4f 54 54 20 42 | 4f 59 44 20 41 4e 44 20 | SCOTT B|OYD AND |
|00004e60| 4a 49 4d 20 4c 55 54 48 | 45 52 20 09 0d 4e 6f 74 |JIM LUTH|ER ..Not|
|00004e70| 20 61 6c 6c 20 66 75 6e | 63 74 69 6f 6e 20 72 65 | all fun|ction re|
|00004e80| 73 75 6c 74 73 20 61 72 | 65 20 65 71 75 61 6c 2e |sults ar|e equal.|
|00004e90| 20 49 67 6e 6f 72 65 20 | 73 6f 6d 65 2c 20 70 61 | Ignore |some, pa|
|00004ea0| 79 20 61 74 74 65 6e 74 | 69 6f 6e 20 74 6f 20 6f |y attent|ion to o|
|00004eb0| 74 68 65 72 73 2e 20 49 | 67 6e 6f 72 65 20 66 75 |thers. I|gnore fu|
|00004ec0| 6e 63 74 69 6f 6e 20 72 | 65 73 75 6c 74 73 20 66 |nction r|esults f|
|00004ed0| 72 6f 6d 20 61 73 79 6e | 63 68 72 6f 6e 6f 75 73 |rom asyn|chronous|
|00004ee0| 20 46 69 6c 65 20 4d 61 | 6e 61 67 65 72 20 61 6e | File Ma|nager an|
|00004ef0| 64 20 50 50 43 20 54 6f | 6f 6c 62 6f 78 20 63 61 |d PPC To|olbox ca|
|00004f00| 6c 6c 73 2e 20 54 68 65 | 79 20 63 6f 6e 74 61 69 |lls. The|y contai|
|00004f10| 6e 20 6e 6f 20 75 73 65 | 66 75 6c 20 69 6e 66 6f |n no use|ful info|
|00004f20| 72 6d 61 74 69 6f 6e 2e | 20 54 6f 20 67 65 74 20 |rmation.| To get |
|00004f30| 75 73 65 66 75 6c 20 72 | 65 73 75 6c 74 20 69 6e |useful r|esult in|
|00004f40| 66 6f 72 6d 61 74 69 6f | 6e 2c 20 77 61 69 74 20 |formatio|n, wait |
|00004f50| 66 6f 72 20 74 68 65 20 | 63 61 6c 6c 20 74 6f 20 |for the |call to |
|00004f60| 63 6f 6d 70 6c 65 74 65 | 2c 20 74 68 65 6e 20 63 |complete|, then c|
|00004f70| 68 65 63 6b 20 69 6f 52 | 65 73 75 6c 74 20 6f 72 |heck ioR|esult or|
|00004f80| 20 72 65 67 69 73 74 65 | 72 20 44 30 3b 20 62 6f | registe|r D0; bo|
|00004f90| 74 68 20 63 6f 6e 74 61 | 69 6e 20 74 68 65 20 72 |th conta|in the r|
|00004fa0| 65 73 75 6c 74 2e 0d 42 | 6f 74 68 20 74 68 65 20 |esult..B|oth the |
|00004fb0| 46 69 6c 65 20 4d 61 6e | 61 67 65 72 20 61 6e 64 |File Man|ager and|
|00004fc0| 20 74 68 65 20 50 50 43 | 20 54 6f 6f 6c 62 6f 78 | the PPC| Toolbox|
|00004fd0| 20 77 69 6c 6c 20 61 6c | 77 61 79 73 20 63 61 6c | will al|ways cal|
|00004fe0| 6c 20 79 6f 75 72 20 63 | 6f 6d 70 6c 65 74 69 6f |l your c|ompletio|
|00004ff0| 6e 20 72 6f 75 74 69 6e | 65 20 69 66 20 79 6f 75 |n routin|e if you|
|00005000| 20 73 70 65 63 69 66 69 | 65 64 20 6f 6e 65 2e 20 | specifi|ed one. |
|00005010| 49 66 20 79 6f 75 20 64 | 69 64 6e d5 74 20 73 75 |If you d|idn.t su|
|00005020| 70 70 6c 79 20 6f 6e 65 | 2c 20 61 6e 64 20 69 6e |pply one|, and in|
|00005030| 73 74 65 61 64 20 61 72 | 65 20 70 6f 6c 6c 69 6e |stead ar|e pollin|
|00005040| 67 2c 20 74 65 73 74 20 | 69 6f 52 65 73 75 6c 74 |g, test |ioResult|
|00005050| 20 69 6e 20 79 6f 75 72 | 20 70 61 72 61 6d 65 74 | in your| paramet|
|00005060| 65 72 20 62 6c 6f 63 6b | 2e 20 54 68 65 20 63 61 |er block|. The ca|
|00005070| 6c 6c 20 68 61 73 20 63 | 6f 6d 70 6c 65 74 65 64 |ll has c|ompleted|
|00005080| 20 69 66 20 69 6f 52 65 | 73 75 6c 74 20 69 73 20 | if ioRe|sult is |
|00005090| 6c 65 73 73 20 74 68 61 | 6e 20 6f 72 20 65 71 75 |less tha|n or equ|
|000050a0| 61 6c 20 74 6f 20 6e 6f | 45 72 72 2e 20 0d 09 44 |al to no|Err. ..D|
|000050b0| 6f 6e d5 74 20 69 67 6e | 6f 72 65 20 66 75 6e 63 |on.t ign|ore func|
|000050c0| 74 69 6f 6e 20 72 65 73 | 75 6c 74 73 20 66 72 6f |tion res|ults fro|
|000050d0| 6d 20 61 73 79 6e 63 68 | 72 6f 6e 6f 75 73 20 44 |m asynch|ronous D|
|000050e0| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 20 63 61 |evice Ma|nager ca|
|000050f0| 6c 6c 73 20 28 66 6f 72 | 20 65 78 61 6d 70 6c 65 |lls (for| example|
|00005100| 2c 20 41 70 70 6c 65 54 | 61 6c 6b 20 64 72 69 76 |, AppleT|alk driv|
|00005110| 65 72 2c 20 53 65 72 69 | 61 6c 20 44 72 69 76 65 |er, Seri|al Drive|
|00005120| 72 2c 20 61 6e 64 20 64 | 69 73 6b 20 64 72 69 76 |r, and d|isk driv|
|00005130| 65 72 20 63 61 6c 6c 73 | 29 2e 20 54 68 65 20 66 |er calls|). The f|
|00005140| 75 6e 63 74 69 6f 6e 20 | 72 65 73 75 6c 74 20 74 |unction |result t|
|00005150| 65 6c 6c 73 20 79 6f 75 | 20 77 68 65 74 68 65 72 |ells you| whether|
|00005160| 20 74 68 65 20 44 65 76 | 69 63 65 20 4d 61 6e 61 | the Dev|ice Mana|
|00005170| 67 65 72 20 73 75 63 63 | 65 73 73 66 75 6c 6c 79 |ger succ|essfully|
|00005180| 20 64 65 6c 69 76 65 72 | 65 64 20 79 6f 75 72 20 | deliver|ed your |
|00005190| 72 65 71 75 65 73 74 20 | 74 6f 20 74 68 65 20 64 |request |to the d|
|000051a0| 65 76 69 63 65 20 64 72 | 69 76 65 72 2e 20 53 75 |evice dr|iver. Su|
|000051b0| 63 63 65 73 73 20 69 73 | 20 69 6e 64 69 63 61 74 |ccess is| indicat|
|000051c0| 65 64 20 62 79 20 6e 6f | 45 72 72 3b 20 61 6e 79 |ed by no|Err; any|
|000051d0| 20 6f 74 68 65 72 20 76 | 61 6c 75 65 20 69 6e 64 | other v|alue ind|
|000051e0| 69 63 61 74 65 73 20 66 | 61 69 6c 75 72 65 2e 0d |icates f|ailure..|
|000051f0| 54 68 65 20 73 79 73 74 | 65 6d 20 63 61 6c 6c 73 |The syst|em calls|
|00005200| 20 79 6f 75 72 20 63 6f | 6d 70 6c 65 74 69 6f 6e | your co|mpletion|
|00005210| 20 72 6f 75 74 69 6e 65 | 20 6f 6e 6c 79 20 69 66 | routine| only if|
|00005220| 20 74 68 65 20 44 65 76 | 69 63 65 20 4d 61 6e 61 | the Dev|ice Mana|
|00005230| 67 65 72 20 73 75 63 63 | 65 73 73 66 75 6c 6c 79 |ger succ|essfully|
|00005240| 20 64 65 6c 69 76 65 72 | 65 64 20 79 6f 75 72 20 | deliver|ed your |
|00005250| 72 65 71 75 65 73 74 20 | 74 6f 20 74 68 65 20 64 |request |to the d|
|00005260| 72 69 76 65 72 2e 20 4f | 6e 20 63 6f 6d 70 6c 65 |river. O|n comple|
|00005270| 74 69 6f 6e 2c 20 63 68 | 65 63 6b 20 77 68 65 74 |tion, ch|eck whet|
|00005280| 68 65 72 20 79 6f 75 72 | 20 63 61 6c 6c 20 73 75 |her your| call su|
|00005290| 63 63 65 65 64 65 64 20 | 62 79 20 6c 6f 6f 6b 69 |cceeded |by looki|
|000052a0| 6e 67 20 69 6e 20 69 6f | 52 65 73 75 6c 74 20 6f |ng in io|Result o|
|000052b0| 72 20 72 65 67 69 73 74 | 65 72 20 44 30 2e 09 0d |r regist|er D0...|
|000052c0| 74 68 65 79 d5 76 65 20 | 63 6f 6d 70 6c 65 74 65 |they.ve |complete|
|000052d0| 64 20 74 68 65 20 74 61 | 73 6b 20 75 6e 74 69 6c |d the ta|sk until|
|000052e0| 20 32 33 20 68 6f 75 72 | 73 20 6c 61 74 65 72 20 | 23 hour|s later |
|000052f0| 28 61 20 32 33 2d 68 6f | 75 72 20 6c 61 74 65 6e |(a 23-ho|ur laten|
|00005300| 63 79 29 2e 20 54 6f 20 | 61 76 6f 69 64 20 6c 61 |cy). To |avoid la|
|00005310| 74 65 6e 63 79 2c 20 75 | 73 65 20 63 6f 6d 70 6c |tency, u|se compl|
|00005320| 65 74 69 6f 6e 20 72 6f | 75 74 69 6e 65 73 20 69 |etion ro|utines i|
|00005330| 6e 73 74 65 61 64 20 6f | 66 20 70 6f 6c 6c 69 6e |nstead o|f pollin|
|00005340| 67 20 69 6f 52 65 73 75 | 6c 74 20 74 6f 20 66 69 |g ioResu|lt to fi|
|00005350| 6e 64 20 6f 75 74 20 77 | 68 65 6e 20 61 20 72 6f |nd out w|hen a ro|
|00005360| 75 74 69 6e 65 20 63 6f | 6d 70 6c 65 74 65 73 2e |utine co|mpletes.|
|00005370| 0d 55 73 69 6e 67 20 43 | 6f 6d 70 6c 65 74 69 6f |.Using C|ompletio|
|00005380| 6e 20 72 6f 75 74 69 6e | 65 73 0d 4d 61 6b 69 6e |n routin|es.Makin|
|00005390| 67 20 61 6e 20 61 73 79 | 6e 63 68 72 6f 6e 6f 75 |g an asy|nchronou|
|000053a0| 73 20 63 61 6c 6c 20 77 | 69 74 68 20 61 20 63 6f |s call w|ith a co|
|000053b0| 6d 70 6c 65 74 69 6f 6e | 20 72 6f 75 74 69 6e 65 |mpletion| routine|
|000053c0| 20 69 73 20 6f 6e 6c 79 | 20 73 6c 69 67 68 74 6c | is only| slightl|
|000053d0| 79 20 6d 6f 72 65 20 63 | 6f 6d 70 6c 65 78 20 74 |y more c|omplex t|
|000053e0| 68 61 6e 20 70 6f 6c 6c | 69 6e 67 20 66 6f 72 20 |han poll|ing for |
|000053f0| 63 6f 6d 70 6c 65 74 69 | 6f 6e 2e 20 41 20 63 6f |completi|on. A co|
|00005400| 6d 70 6c 65 74 69 6f 6e | 20 72 6f 75 74 69 6e 65 |mpletion| routine|
|00005410| 20 69 73 20 61 20 70 72 | 6f 63 65 64 75 72 65 20 | is a pr|ocedure |
|00005420| 74 68 61 74 d5 73 20 63 | 61 6c 6c 65 64 20 61 73 |that.s c|alled as|
|00005430| 20 73 6f 6f 6e 20 61 73 | 20 74 68 65 20 61 73 79 | soon as| the asy|
|00005440| 6e 63 68 72 6f 6e 6f 75 | 73 20 66 75 6e 63 74 69 |nchronou|s functi|
|00005450| 6f 6e 20 63 6f 6d 70 6c | 65 74 65 73 20 69 74 73 |on compl|etes its|
|00005460| 20 74 61 73 6b 2e 20 57 | 68 65 6e 20 79 6f 75 72 | task. W|hen your|
|00005470| 20 70 72 6f 67 72 61 6d | 20 66 69 6c 6c 73 20 69 | program| fills i|
|00005480| 6e 20 74 68 65 20 70 61 | 72 61 6d 65 74 65 72 20 |n the pa|rameter |
|00005490| 62 6c 6f 63 6b 20 74 6f | 20 70 61 73 73 20 74 6f |block to| pass to|
|000054a0| 20 74 68 65 20 66 75 6e | 63 74 69 6f 6e 2c 20 69 | the fun|ction, i|
|000054b0| 74 20 73 65 74 73 20 74 | 68 65 20 69 6f 43 6f 6d |t sets t|he ioCom|
|000054c0| 70 6c 65 74 69 6f 6e 20 | 66 69 65 6c 64 20 74 6f |pletion |field to|
|000054d0| 20 70 6f 69 6e 74 20 74 | 6f 20 74 68 65 20 63 6f | point t|o the co|
|000054e0| 6d 70 6c 65 74 69 6f 6e | 20 72 6f 75 74 69 6e 65 |mpletion| routine|
|000054f0| 2e 20 54 68 65 6e 2c 20 | 61 66 74 65 72 20 63 61 |. Then, |after ca|
|00005500| 6c 6c 69 6e 67 20 74 68 | 65 20 66 75 6e 63 74 69 |lling th|e functi|
|00005510| 6f 6e 20 61 73 79 6e 63 | 68 72 6f 6e 6f 75 73 6c |on async|hronousl|
|00005520| 79 2c 20 79 6f 75 72 20 | 70 72 6f 67 72 61 6d 20 |y, your |program |
|00005530| 63 61 6e 20 63 6f 6e 74 | 69 6e 75 65 2e 20 57 68 |can cont|inue. Wh|
|00005540| 65 6e 20 74 68 65 20 66 | 75 6e 63 74 69 6f 6e 20 |en the f|unction |
|00005550| 63 6f 6d 70 6c 65 74 65 | 73 2c 20 74 68 65 20 73 |complete|s, the s|
|00005560| 79 73 74 65 6d 20 69 6e | 74 65 72 72 75 70 74 73 |ystem in|terrupts|
|00005570| 20 74 68 65 20 70 72 6f | 67 72 61 6d 20 74 68 61 | the pro|gram tha|
|00005580| 74 d5 73 20 72 75 6e 6e | 69 6e 67 20 61 6e 64 20 |t.s runn|ing and |
|00005590| 74 68 65 20 63 6f 6d 70 | 6c 65 74 69 6f 6e 20 72 |the comp|letion r|
|000055a0| 6f 75 74 69 6e 65 20 69 | 73 20 65 78 65 63 75 74 |outine i|s execut|
|000055b0| 65 64 2e 20 28 54 68 65 | 72 65 20 61 72 65 20 73 |ed. (The|re are s|
|000055c0| 6f 6d 65 20 73 70 65 63 | 69 61 6c 20 74 68 69 6e |ome spec|ial thin|
|000055d0| 67 73 20 79 6f 75 20 6e | 65 65 64 20 74 6f 20 6b |gs you n|eed to k|
|000055e0| 6e 6f 77 20 61 62 6f 75 | 74 20 66 75 6e 63 74 69 |now abou|t functi|
|000055f0| 6f 6e 20 72 65 73 75 6c | 74 73 20 74 6f 20 75 73 |on resul|ts to us|
|00005600| 65 20 74 68 69 73 20 6d | 6f 64 65 6c 3b 20 73 65 |e this m|odel; se|
|00005610| 65 20 d2 46 75 6e 63 74 | 69 6f 6e 20 52 65 73 75 |e .Funct|ion Resu|
|00005620| 6c 74 73 20 61 6e 64 20 | 46 75 6e 63 74 69 6f 6e |lts and |Function|
|00005630| 20 43 6f 6d 70 6c 65 74 | 69 6f 6e 2e d3 29 0d 53 | Complet|ion..).S|
|00005640| 69 6e 63 65 20 74 68 65 | 20 63 6f 6d 70 6c 65 74 |ince the| complet|
|00005650| 69 6f 6e 20 72 6f 75 74 | 69 6e 65 20 69 73 20 65 |ion rout|ine is e|
|00005660| 78 65 63 75 74 65 64 20 | 61 73 20 73 6f 6f 6e 20 |xecuted |as soon |
|00005670| 61 73 20 74 68 65 20 66 | 75 6e 63 74 69 6f 6e d5 |as the f|unction.|
|00005680| 73 20 74 61 73 6b 20 69 | 73 20 63 6f 6d 70 6c 65 |s task i|s comple|
|00005690| 74 65 2c 20 79 6f 75 72 | 20 70 72 6f 67 72 61 6d |te, your| program|
|000056a0| 20 66 69 6e 64 73 20 6f | 75 74 20 61 62 6f 75 74 | finds o|ut about|
|000056b0| 20 63 6f 6d 70 6c 65 74 | 69 6f 6e 20 69 6d 6d 65 | complet|ion imme|
|000056c0| 64 69 61 74 65 6c 79 20 | 61 6e 64 20 63 61 6e 20 |diately |and can |
|000056d0| 73 74 61 72 74 20 70 72 | 6f 63 65 73 73 69 6e 67 |start pr|ocessing|
|000056e0| 20 74 68 65 20 72 65 73 | 75 6c 74 73 20 6f 66 20 | the res|ults of |
|000056f0| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 2e 20 55 73 |the func|tion. Us|
|00005700| 69 6e 67 20 61 20 63 6f | 6d 70 6c 65 74 69 6f 6e |ing a co|mpletion|
|00005710| 20 72 6f 75 74 69 6e 65 | 20 69 73 20 6c 69 6b 65 | routine| is like|
|00005720| 20 67 69 76 69 6e 67 20 | 73 6f 6d 65 6f 6e 65 20 | giving |someone |
|00005730| 61 20 74 61 73 6b 20 61 | 6e 64 20 74 68 65 6e 20 |a task a|nd then |
|00005740| 61 73 6b 69 6e 67 20 74 | 68 65 6d 20 74 6f 20 63 |asking t|hem to c|
|00005750| 61 6c 6c 20 79 6f 75 20 | 61 73 20 73 6f 6f 6e 20 |all you |as soon |
|00005760| 61 73 20 74 68 65 79 d5 | 76 65 20 63 6f 6d 70 6c |as they.|ve compl|
|00005770| 65 74 65 64 20 69 74 2e | 0d 42 65 63 61 75 73 65 |eted it.|.Because|
|00005780| 20 61 20 63 6f 6d 70 6c | 65 74 69 6f 6e 20 72 6f | a compl|etion ro|
|00005790| 75 74 69 6e 65 20 6d 61 | 79 20 62 65 20 63 61 6c |utine ma|y be cal|
|000057a0| 6c 65 64 20 61 74 20 69 | 6e 74 65 72 72 75 70 74 |led at i|nterrupt|
|000057b0| 20 74 69 6d 65 2c 20 69 | 74 20 63 61 6e d5 74 20 | time, i|t can.t |
|000057c0| 61 73 73 75 6d 65 20 74 | 68 69 6e 67 73 20 74 68 |assume t|hings th|
|000057d0| 61 74 20 6d 6f 73 74 20 | 61 70 70 6c 69 63 61 74 |at most |applicat|
|000057e0| 69 6f 6e 20 63 6f 64 65 | 20 63 61 6e 2e 20 57 68 |ion code| can. Wh|
|000057f0| 65 6e 20 61 20 63 6f 6d | 70 6c 65 74 69 6f 6e 20 |en a com|pletion |
|00005800| 72 6f 75 74 69 6e 65 20 | 66 6f 72 20 61 6e 20 61 |routine |for an a|
|00005810| 73 79 6e 63 68 72 6f 6e | 6f 75 73 20 66 75 6e 63 |synchron|ous func|
|00005820| 74 69 6f 6e 20 67 65 74 | 73 20 63 6f 6e 74 72 6f |tion get|s contro|
|00005830| 6c 2c 20 74 68 65 20 73 | 79 73 74 65 6d 20 69 73 |l, the s|ystem is|
|00005840| 20 69 6e 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e | in the |followin|
|00005850| 67 20 73 74 61 74 65 3a | 0d a5 09 4f 6e 20 65 6e |g state:|...On en|
|00005860| 74 72 79 2c 20 72 65 67 | 69 73 74 65 72 20 41 30 |try, reg|ister A0|
|00005870| 20 70 6f 69 6e 74 73 20 | 74 6f 20 74 68 65 20 70 | points |to the p|
|00005880| 61 72 61 6d 65 74 65 72 | 20 62 6c 6f 63 6b 20 75 |arameter| block u|
|00005890| 73 65 64 20 74 6f 20 6d | 61 6b 65 20 74 68 65 20 |sed to m|ake the |
|000058a0| 61 73 79 6e 63 68 72 6f | 6e 6f 75 73 20 63 61 6c |asynchro|nous cal|
|000058b0| 6c 2e 0d a5 09 59 6f 75 | 72 20 70 72 6f 67 72 61 |l....You|r progra|
|000058c0| 6d 20 61 67 61 69 6e 20 | 6f 77 6e 73 20 74 68 65 |m again |owns the|
|000058d0| 20 70 61 72 61 6d 65 74 | 65 72 20 62 6c 6f 63 6b | paramet|er block|
|000058e0| 20 75 73 65 64 20 74 6f | 20 6d 61 6b 65 20 74 68 | used to| make th|
|000058f0| 65 20 61 73 79 6e 63 68 | 72 6f 6e 6f 75 73 20 63 |e asynch|ronous c|
|00005900| 61 6c 6c 2c 20 77 68 69 | 63 68 20 6d 65 61 6e 73 |all, whi|ch means|
|00005910| 20 79 6f 75 20 63 61 6e | 20 72 65 75 73 65 20 74 | you can| reuse t|
|00005920| 68 65 20 70 61 72 61 6d | 65 74 65 72 20 62 6c 6f |he param|eter blo|
|00005930| 63 6b 20 74 6f 20 6d 61 | 6b 65 20 61 6e 6f 74 68 |ck to ma|ke anoth|
|00005940| 65 72 20 61 73 79 6e 63 | 68 72 6f 6e 6f 75 73 20 |er async|hronous |
|00005950| 63 61 6c 6c 20 28 73 65 | 65 20 74 68 65 20 73 65 |call (se|e the se|
|00005960| 63 74 69 6f 6e 20 d2 43 | 61 6c 6c 20 43 68 61 69 |ction .C|all Chai|
|00005970| 6e 69 6e 67 d3 20 6c 61 | 74 65 72 20 69 6e 20 74 |ning. la|ter in t|
|00005980| 68 69 73 20 61 72 74 69 | 63 6c 65 29 2e 0d a5 09 |his arti|cle)....|
|00005990| 42 6f 74 68 20 72 65 67 | 69 73 74 65 72 20 44 30 |Both reg|ister D0|
|000059a0| 20 61 6e 64 20 69 6f 52 | 65 73 75 6c 74 20 69 6e | and ioR|esult in|
|000059b0| 20 74 68 65 20 70 61 72 | 61 6d 65 74 65 72 20 62 | the par|ameter b|
|000059c0| 6c 6f 63 6b 20 63 6f 6e | 74 61 69 6e 20 74 68 65 |lock con|tain the|
|000059d0| 20 72 65 73 75 6c 74 20 | 73 74 61 74 75 73 20 66 | result |status f|
|000059e0| 72 6f 6d 20 74 68 65 20 | 66 75 6e 63 74 69 6f 6e |rom the |function|
|000059f0| 20 63 61 6c 6c 2e 0d a5 | 09 46 6f 72 20 63 6f 6d | call...|.For com|
|00005a00| 70 6c 65 74 69 6f 6e 20 | 72 6f 75 74 69 6e 65 73 |pletion |routines|
|00005a10| 20 63 61 6c 6c 65 64 20 | 62 79 20 74 68 65 20 46 | called |by the F|
|00005a20| 69 6c 65 20 4d 61 6e 61 | 67 65 72 20 6f 72 20 44 |ile Mana|ger or D|
|00005a30| 65 76 69 63 65 20 4d 61 | 6e 61 67 65 72 2c 20 74 |evice Ma|nager, t|
|00005a40| 68 65 20 41 35 20 77 6f | 72 6c 64 20 69 73 20 75 |he A5 wo|rld is u|
|00005a50| 6e 64 65 66 69 6e 65 64 | 20 61 6e 64 20 6d 75 73 |ndefined| and mus|
|00005a60| 74 20 62 65 20 72 65 73 | 74 6f 72 65 64 20 62 65 |t be res|tored be|
|00005a70| 66 6f 72 65 20 74 68 65 | 20 63 6f 6d 70 6c 65 74 |fore the| complet|
|00005a80| 69 6f 6e 20 72 6f 75 74 | 69 6e 65 20 75 73 65 73 |ion rout|ine uses|
|00005a90| 20 61 6e 79 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | any app|lication|
|00005aa0| 20 67 6c 6f 62 61 6c 20 | 76 61 72 69 61 62 6c 65 | global |variable|
|00005ab0| 73 2e 0d 53 69 6e 63 65 | 20 63 6f 6d 70 6c 65 74 |s..Since| complet|
|00005ac0| 69 6f 6e 20 72 6f 75 74 | 69 6e 65 73 20 65 78 65 |ion rout|ines exe|
|00005ad0| 63 75 74 65 20 61 74 20 | 69 6e 74 65 72 72 75 70 |cute at |interrup|
|00005ae0| 74 20 74 69 6d 65 2c 20 | 74 68 65 79 20 6d 75 73 |t time, |they mus|
|00005af0| 74 20 66 6f 6c 6c 6f 77 | 20 74 68 65 73 65 20 72 |t follow| these r|
|00005b00| 75 6c 65 73 3a 0d a5 09 | 54 68 65 79 20 6d 75 73 |ules:...|They mus|
|00005b10| 74 20 70 72 65 73 65 72 | 76 65 20 61 6c 6c 20 72 |t preser|ve all r|
|00005b20| 65 67 69 73 74 65 72 73 | 20 65 78 63 65 70 74 20 |egisters| except |
|00005b30| 41 30 2c 20 41 31 2c 20 | 61 6e 64 20 44 30 2d 44 |A0, A1, |and D0-D|
|00005b40| 32 2e 0d a5 09 54 68 65 | 79 20 63 61 6e d5 74 20 |2....The|y can.t |
|00005b50| 63 61 6c 6c 20 72 6f 75 | 74 69 6e 65 73 20 74 68 |call rou|tines th|
|00005b60| 61 74 20 63 61 6e 20 64 | 69 72 65 63 74 6c 79 20 |at can d|irectly |
|00005b70| 6f 72 20 69 6e 64 69 72 | 65 63 74 6c 79 20 6d 6f |or indir|ectly mo|
|00005b80| 76 65 20 6d 65 6d 6f 72 | 79 2c 20 61 6e 64 20 74 |ve memor|y, and t|
|00005b90| 68 65 79 20 63 61 6e d5 | 74 20 64 65 70 65 6e 64 |hey can.|t depend|
|00005ba0| 20 6f 6e 20 74 68 65 20 | 76 61 6c 69 64 69 74 79 | on the |validity|
|00005bb0| 20 6f 66 20 68 61 6e 64 | 6c 65 73 20 74 6f 20 75 | of hand|les to u|
|00005bc0| 6e 6c 6f 63 6b 65 64 20 | 62 6c 6f 63 6b 73 2e 0d |nlocked |blocks..|
|00005bd0| a5 09 54 68 65 79 20 73 | 68 6f 75 6c 64 6e d5 74 |..They s|houldn.t|
|00005be0| 20 70 65 72 66 6f 72 6d | 20 74 69 6d 65 2d 63 6f | perform| time-co|
|00005bf0| 6e 73 75 6d 69 6e 67 20 | 74 61 73 6b 73 2c 20 62 |nsuming |tasks, b|
|00005c00| 65 63 61 75 73 65 20 69 | 6e 74 65 72 72 75 70 74 |ecause i|nterrupt|
|00005c10| 73 20 6d 61 79 20 62 65 | 20 64 69 73 61 62 6c 65 |s may be| disable|
|00005c20| 64 2e 20 41 73 20 70 6f | 69 6e 74 65 64 20 6f 75 |d. As po|inted ou|
|00005c30| 74 20 69 6e 20 74 68 65 | 20 4d 61 63 69 6e 74 6f |t in the| Macinto|
|00005c40| 73 68 20 54 65 63 68 6e | 69 63 61 6c 20 4e 6f 74 |sh Techn|ical Not|
|00005c50| 65 20 d2 4e 75 42 75 73 | aa 20 49 6e 74 65 72 72 |e .NuBus|. Interr|
|00005c60| 75 70 74 20 4c 61 74 65 | 6e 63 79 20 28 49 20 57 |upt Late|ncy (I W|
|00005c70| 61 73 20 61 20 54 65 65 | 6e 61 67 65 20 44 4d 41 |as a Tee|nage DMA|
|00005c80| 20 4a 75 6e 6b 69 65 29 | 2c d3 20 64 69 73 61 62 | Junkie)|,. disab|
|00005c90| 6c 69 6e 67 20 69 6e 74 | 65 72 72 75 70 74 73 20 |ling int|errupts |
|00005ca0| 61 6e 64 20 74 61 6b 69 | 6e 67 20 6f 76 65 72 20 |and taki|ng over |
|00005cb0| 74 68 65 20 6d 61 63 68 | 69 6e 65 20 66 6f 72 20 |the mach|ine for |
|00005cc0| 6c 6f 6e 67 20 70 65 72 | 69 6f 64 73 20 6f 66 20 |long per|iods of |
|00005cd0| 74 69 6d 65 20 d2 61 6c | 6d 6f 73 74 20 61 6c 77 |time .al|most alw|
|00005ce0| 61 79 73 20 72 65 73 75 | 6c 74 73 20 69 6e 20 61 |ays resu|lts in a|
|00005cf0| 20 73 6c 75 67 67 69 73 | 68 20 75 73 65 72 20 69 | sluggis|h user i|
|00005d00| 6e 74 65 72 66 61 63 65 | 2c 20 73 6f 6d 65 74 68 |nterface|, someth|
|00005d10| 69 6e 67 20 77 68 69 63 | 68 20 69 73 20 6e 6f 74 |ing whic|h is not|
|00005d20| 20 75 73 75 61 6c 6c 79 | 20 77 65 6c 6c 20 72 65 | usually| well re|
|00005d30| 63 65 69 76 65 64 20 62 | 79 20 74 68 65 20 75 73 |ceived b|y the us|
|00005d40| 65 72 2e d3 20 53 6f 6d | 65 20 77 61 79 73 20 74 |er.. Som|e ways t|
|00005d50| 6f 20 64 65 66 65 72 20 | 74 69 6d 65 2d 63 6f 6e |o defer |time-con|
|00005d60| 73 75 6d 69 6e 67 20 74 | 61 73 6b 73 20 61 72 65 |suming t|asks are|
|00005d70| 20 73 68 6f 77 6e 20 6c | 61 74 65 72 20 69 6e 20 | shown l|ater in |
|00005d80| 74 68 69 73 20 0d 61 72 | 74 69 63 6c 65 2e 0d a5 |this .ar|ticle...|
|00005d90| 09 54 68 65 79 20 63 61 | 6e d5 74 20 6d 61 6b 65 |.They ca|n.t make|
|00005da0| 20 73 79 6e 63 68 72 6f | 6e 6f 75 73 20 63 61 6c | synchro|nous cal|
|00005db0| 6c 73 20 74 6f 20 64 65 | 76 69 63 65 20 64 72 69 |ls to de|vice dri|
|00005dc0| 76 65 72 73 2c 20 74 68 | 65 20 46 69 6c 65 20 4d |vers, th|e File M|
|00005dd0| 61 6e 61 67 65 72 2c 20 | 6f 72 20 74 68 65 20 50 |anager, |or the P|
|00005de0| 50 43 20 54 6f 6f 6c 62 | 6f 78 20 66 6f 72 20 74 |PC Toolb|ox for t|
|00005df0| 68 65 20 72 65 61 73 6f | 6e 73 20 67 69 76 65 6e |he reaso|ns given|
|00005e00| 20 65 61 72 6c 69 65 72 | 2e 0d 50 50 43 20 54 6f | earlier|..PPC To|
|00005e10| 6f 6c 62 6f 78 20 63 6f | 6d 70 6c 65 74 69 6f 6e |olbox co|mpletion|
|00005e20| 20 72 6f 75 74 69 6e 65 | 73 2e 20 54 68 65 20 50 | routine|s. The P|
|00005e30| 50 43 20 54 6f 6f 6c 62 | 6f 78 20 73 69 6d 70 6c |PC Toolb|ox simpl|
|00005e40| 69 66 69 65 73 20 74 68 | 65 20 6a 6f 62 20 6f 66 |ifies th|e job of|
|00005e50| 20 77 72 69 74 69 6e 67 | 20 63 6f 6d 70 6c 65 74 | writing| complet|
|00005e60| 69 6f 6e 20 72 6f 75 74 | 69 6e 65 73 2e 20 57 68 |ion rout|ines. Wh|
|00005e70| 65 6e 20 61 20 50 50 43 | 20 54 6f 6f 6c 62 6f 78 |en a PPC| Toolbox|
|00005e80| 20 66 75 6e 63 74 69 6f | 6e 20 69 73 20 63 61 6c | functio|n is cal|
|00005e90| 6c 65 64 20 61 73 79 6e | 63 68 72 6f 6e 6f 75 73 |led asyn|chronous|
|00005ea0| 6c 79 2c 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |ly, the |current |
|00005eb0| 76 61 6c 75 65 20 6f 66 | 20 72 65 67 69 73 74 65 |value of| registe|
|00005ec0| 72 20 41 35 20 69 73 20 | 73 74 6f 72 65 64 2e 20 |r A5 is |stored. |
|00005ed0| 57 68 65 6e 20 74 68 65 | 20 63 6f 6d 70 6c 65 74 |When the| complet|
|00005ee0| 69 6f 6e 20 72 6f 75 74 | 69 6e 65 20 66 6f 72 20 |ion rout|ine for |
|00005ef0| 74 68 61 74 20 63 61 6c | 6c 20 69 73 20 65 78 65 |that cal|l is exe|
|00005f00| 63 75 74 65 64 20 62 79 | 20 74 68 65 20 50 50 43 |cuted by| the PPC|
|00005f10| 20 54 6f 6f 6c 62 6f 78 | 2c 20 74 68 65 20 73 74 | Toolbox|, the st|
|00005f20| 6f 72 65 64 20 41 35 20 | 76 61 6c 75 65 20 69 73 |ored A5 |value is|
|00005f30| 20 72 65 73 74 6f 72 65 | 64 20 61 6e 64 20 74 68 | restore|d and th|
|00005f40| 65 20 70 61 72 61 6d 65 | 74 65 72 20 62 6c 6f 63 |e parame|ter bloc|
|00005f50| 6b 20 70 6f 69 6e 74 65 | 72 20 75 73 65 64 20 74 |k pointe|r used t|
|00005f60| 6f 20 6d 61 6b 65 20 74 | 68 65 20 63 61 6c 6c 20 |o make t|he call |
|00005f70| 69 73 20 70 61 73 73 65 | 64 20 61 73 20 74 68 65 |is passe|d as the|
|00005f80| 20 69 6e 70 75 74 20 70 | 61 72 61 6d 65 74 65 72 | input p|arameter|
|00005f90| 20 74 6f 20 74 68 65 20 | 63 6f 6d 70 6c 65 74 69 | to the |completi|
|00005fa0| 6f 6e 20 72 6f 75 74 69 | 6e 65 2e 0d 41 20 63 6f |on routi|ne..A co|
|00005fb0| 6d 70 6c 65 74 69 6f 6e | 20 72 6f 75 74 69 6e 65 |mpletion| routine|
|00005fc0| 20 63 61 6c 6c 65 64 20 | 62 79 20 74 68 65 20 50 | called |by the P|
|00005fd0| 50 43 20 54 6f 6f 6c 62 | 6f 78 20 68 61 73 20 74 |PC Toolb|ox has t|
|00005fe0| 68 69 73 20 66 6f 72 6d | 61 74 20 69 6e 20 50 61 |his form|at in Pa|
|00005ff0| 73 63 61 6c 3a 0d 50 52 | 4f 43 45 44 55 52 45 20 |scal:.PR|OCEDURE |
|00006000| 4d 79 43 6f 6d 70 6c 65 | 74 69 6f 6e 52 6f 75 74 |MyComple|tionRout|
|00006010| 69 6e 65 20 28 70 62 50 | 74 72 3a 20 50 50 43 50 |ine (pbP|tr: PPCP|
|00006020| 61 72 61 6d 42 6c 6f 63 | 6b 50 74 72 29 3b 0d 50 |aramBloc|kPtr);.P|
|00006030| 50 43 20 54 6f 6f 6c 62 | 6f 78 20 63 6f 6d 70 6c |PC Toolb|ox compl|
|00006040| 65 74 69 6f 6e 20 72 6f | 75 74 69 6e 65 73 20 61 |etion ro|utines a|
|00006050| 72 65 20 73 74 69 6c 6c | 20 63 61 6c 6c 65 64 20 |re still| called |
|00006060| 61 74 20 69 6e 74 65 72 | 72 75 70 74 20 74 69 6d |at inter|rupt tim|
|00006070| 65 20 61 6e 64 20 73 6f | 20 6d 75 73 74 20 66 6f |e and so| must fo|
|00006080| 6c 6c 6f 77 20 74 68 65 | 20 72 75 6c 65 73 20 6f |llow the| rules o|
|00006090| 66 20 65 78 65 63 75 74 | 69 6f 6e 20 61 74 20 69 |f execut|ion at i|
|000060a0| 6e 74 65 72 72 75 70 74 | 20 74 69 6d 65 2e 0d 54 |nterrupt| time..T|
|000060b0| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 63 6f 64 |he follo|wing cod|
|000060c0| 65 20 73 68 6f 77 73 20 | 61 6e 20 61 73 79 6e 63 |e shows |an async|
|000060d0| 68 72 6f 6e 6f 75 73 20 | 50 50 43 49 6e 66 6f 72 |hronous |PPCInfor|
|000060e0| 6d 20 63 61 6c 6c 20 61 | 6e 64 20 69 74 73 20 63 |m call a|nd its c|
|000060f0| 6f 6d 70 6c 65 74 69 6f | 6e 20 72 6f 75 74 69 6e |ompletio|n routin|
|00006100| 65 2e 0d 0d 50 52 4f 43 | 45 44 55 52 45 20 49 6e |e...PROC|EDURE In|
|00006110| 66 6f 72 6d 43 6f 6d 70 | 6c 65 74 65 20 28 70 62 |formComp|lete (pb|
|00006120| 50 74 72 3a 20 50 50 43 | 50 61 72 61 6d 42 6c 6f |Ptr: PPC|ParamBlo|
|00006130| 63 6b 50 74 72 29 3b 0d | 42 45 47 49 4e 0d 09 49 |ckPtr);.|BEGIN..I|
|00006140| 46 20 70 62 50 74 72 5e | 2e 69 6e 66 6f 72 6d 50 |F pbPtr^|.informP|
|00006150| 61 72 61 6d 2e 69 6f 52 | 65 73 75 6c 74 20 3d 20 |aram.ioR|esult = |
|00006160| 6e 6f 45 72 72 20 54 48 | 45 4e 0d 09 09 42 45 47 |noErr TH|EN...BEG|
|00006170| 49 4e 0d 09 09 09 7b 20 | 54 68 65 20 50 50 43 49 |IN....{ |The PPCI|
|00006180| 6e 66 6f 72 6d 20 63 61 | 6c 6c 20 63 6f 6d 70 6c |nform ca|ll compl|
|00006190| 65 74 65 64 20 73 75 63 | 63 65 73 73 66 75 6c 6c |eted suc|cessfull|
|000061a0| 79 2e 20 7d 0d 09 09 45 | 4e 44 0d 09 45 4c 53 45 |y. }...E|ND..ELSE|
|000061b0| 0d 09 09 42 45 47 49 4e | 0d 09 09 09 7b 20 54 68 |...BEGIN|....{ Th|
|000061c0| 65 20 50 50 43 49 6e 66 | 6f 72 6d 20 63 61 6c 6c |e PPCInf|orm call|
|000061d0| 20 66 61 69 6c 65 64 3b | 20 68 61 6e 64 6c 65 20 | failed;| handle |
|000061e0| 74 68 65 20 65 72 72 6f | 72 2e 20 7d 0d 09 09 45 |the erro|r. }...E|
|000061f0| 4e 44 3b 0d 45 4e 44 3b | 0d 50 52 4f 43 45 44 55 |ND;.END;|.PROCEDU|
|00006200| 52 45 20 44 6f 50 50 43 | 49 6e 66 6f 72 6d 3b 0d |RE DoPPC|Inform;.|
|00006210| 09 56 41 52 0d 09 09 65 | 72 72 3a 20 4f 53 45 72 |.VAR...e|rr: OSEr|
|00006220| 72 3b 09 7b 20 45 72 72 | 6f 72 20 63 6f 6e 64 69 |r;.{ Err|or condi|
|00006230| 74 69 6f 6e 73 20 61 72 | 65 20 69 67 6e 6f 72 65 |tions ar|e ignore|
|00006240| 64 20 69 6e 20 74 68 69 | 73 20 70 72 6f 63 65 64 |d in thi|s proced|
|00006250| 75 72 65 20 7d 0d 09 09 | 09 09 09 09 09 7b 20 62 |ure }...|.....{ b|
|00006260| 65 63 61 75 73 65 20 74 | 68 65 79 20 61 72 65 20 |ecause t|hey are |
|00006270| 63 61 75 67 68 74 20 69 | 6e 20 49 6e 66 6f 72 6d |caught i|n Inform|
|00006280| 43 6f 6d 70 6c 65 74 65 | 2e 20 7d 0d 42 45 47 49 |Complete|. }.BEGI|
|00006290| 4e 0d 09 67 50 50 43 50 | 61 72 61 6d 42 6c 6f 63 |N..gPPCP|aramBloc|
|000062a0| 6b 2e 69 6e 66 6f 72 6d | 50 61 72 61 6d 2e 69 6f |k.inform|Param.io|
|000062b0| 43 6f 6d 70 6c 65 74 69 | 6f 6e 20 3a 3d 20 40 49 |Completi|on := @I|
|000062c0| 6e 66 6f 72 6d 43 6f 6d | 70 6c 65 74 65 3b 0d 09 |nformCom|plete;..|
|000062d0| 67 50 50 43 50 61 72 61 | 6d 42 6c 6f 63 6b 2e 69 |gPPCPara|mBlock.i|
|000062e0| 6e 66 6f 72 6d 50 61 72 | 61 6d 2e 70 6f 72 74 52 |nformPar|am.portR|
|000062f0| 65 66 4e 75 6d 20 3a 3d | 20 67 50 6f 72 74 52 65 |efNum :=| gPortRe|
|00006300| 66 4e 75 6d 3b 0d 09 67 | 50 50 43 50 61 72 61 6d |fNum;..g|PPCParam|
|00006310| 42 6c 6f 63 6b 2e 69 6e | 66 6f 72 6d 50 61 72 61 |Block.in|formPara|
|00006320| 6d 2e 61 75 74 6f 41 63 | 63 65 70 74 20 3a 3d 20 |m.autoAc|cept := |
|00006330| 54 52 55 45 3b 0d 09 67 | 50 50 43 50 61 72 61 6d |TRUE;..g|PPCParam|
|00006340| 42 6c 6f 63 6b 2e 69 6e | 66 6f 72 6d 50 61 72 61 |Block.in|formPara|
|00006350| 6d 2e 70 6f 72 74 4e 61 | 6d 65 20 3a 3d 20 40 67 |m.portNa|me := @g|
|00006360| 50 50 43 50 6f 72 74 3b | 0d 09 67 50 50 43 50 61 |PPCPort;|..gPPCPa|
|00006370| 72 61 6d 42 6c 6f 63 6b | 2e 69 6e 66 6f 72 6d 50 |ramBlock|.informP|
|00006380| 61 72 61 6d 2e 6c 6f 63 | 61 74 69 6f 6e 4e 61 6d |aram.loc|ationNam|
|00006390| 65 20 3a 3d 20 40 67 4c | 6f 63 61 74 69 6f 6e 4e |e := @gL|ocationN|
|000063a0| 61 6d 65 3b 0d 09 67 50 | 50 43 50 61 72 61 6d 42 |ame;..gP|PCParamB|
|000063b0| 6c 6f 63 6b 2e 69 6e 66 | 6f 72 6d 50 61 72 61 6d |lock.inf|ormParam|
|000063c0| 2e 75 73 65 72 4e 61 6d | 65 20 3a 3d 20 40 67 55 |.userNam|e := @gU|
|000063d0| 73 65 72 4e 61 6d 65 3b | 0d 09 65 72 72 20 3a 3d |serName;|..err :=|
|000063e0| 20 50 50 43 49 6e 66 6f | 72 6d 28 50 50 43 49 6e | PPCInfo|rm(PPCIn|
|000063f0| 66 6f 72 6d 50 42 50 74 | 72 28 40 67 50 50 43 50 |formPBPt|r(@gPPCP|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.